all parms random randomize randomize_vs_shuffle total
There are main 3 ways for randomizing, a sequence (random), an option (randomly) and an action (randomize)
The sequence 'random'
|
HTML
|
RESULT
|
{sequence random, rows=25, minimal=10, maximal=50 } {$sequence} {/sequence}
|
21 45 31 46 39 25 41 28 11 34 35 46 33 18 28 19 36 45 44 25 43 28 45 25 30
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
10 17 16 18 44 29 40 21 46 33 28 31 45 32 42 35 25 48 20 27 47 36 22 43 24
|
The sequence option 'randomly'
Here the loop index is randomly set before the sequence is executed.
|
HTML
|
RESULT
|
{sequence power=2, rows=10, randomly, from=8, to=16} {$sequence} {/sequence}
|
512 32768 16384 512 8192 65536 2048 32768 4096
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
701 401 769 317 811 19 3 821 881 557
|
The sequence action 'randomize'
|
HTML
|
RESULT
|
{sequence from=10, to=20, push='mySeq'}
|
|
{mySeq} {$sequence} {/mySeq}
|
10 11 12 13 14 15 16 17 18 19 20
|
{mySeq randomize } {$sequence} {/mySeq}
|
17 14 15 16 19 18 10 12 13 11 20
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
19 13 10 18 20
|
|