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 32 27 11 14 31 18 44 38 39 32 44 44 49 30 45 12 25 30 16 12 11 44 49 11
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
17 10 18 50 48 13 24 28 47 19 44 37 30 23 29 45 36 32 46 43 39 27 42 41 12
|
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}
|
256 512 65536 8192 1024 32768 32768 1024 8192
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
521 23 211 167 577 613 5 541 397 797
|
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}
|
18 11 20 14 13 16 10 15 17 12 19
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
18 14 11 10 12
|
|