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}
|
16 21 19 22 27 10 20 12 48 32 35 19 26 41 10 30 11 40 44 13 42 16 33 43 31
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
19 33 16 43 41 48 25 45 35 31 36 30 42 27 20 50 13 34 15 32 22 18 11 28 10
|
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}
|
4096 16384 4096 256 8192 256 256 2048 256
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
269 227 251 641 239 617 113 619 421 619
|
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}
|
14 16 12 18 20 15 13 19 17 10 11
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
15 10 13 16 18
|
|