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 46 11 14 50 11 12 34 12 27 17 35 46 39 13 46 23 38 32 32 26 40 39 17 46
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
40 13 41 33 44 47 30 26 21 15 16 38 17 48 35 22 10 11 12 19 24 42 18 45 46
|
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 512 32768 8192 2048 8192 4096 1024 256
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
359 11 269 617 607 379 887 937 167 197
|
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}
|
16 19 12 11 14 18 17 13 10 20 15
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
10 16 13 15 17
|
|