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}
|
22 30 16 33 19 29 27 42 11 30 44 39 21 35 20 31 24 31 14 12 25 37 18 15 32
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
49 16 27 47 11 42 32 36 21 41 43 50 48 35 20 25 34 33 31 30 24 40 18 28 14
|
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}
|
16384 16384 65536 256 16384 4096 16384 256 2048
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
521 179 163 827 797 673 239 149 509 461
|
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}
|
13 11 20 17 10 15 12 19 14 16 18
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
10 14 12 13 17
|
|