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}
|
15 11 14 12 34 18 38 34 41 31 32 48 15 45 14 41 15 34 10 27 38 15 42 48 22
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
32 26 20 17 44 28 49 31 18 14 50 35 46 39 29 38 30 37 41 24 33 45 40 15 11
|
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}
|
32768 4096 1024 4096 2048 512 512 32768 8192
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
383 347 127 673 929 571 599 829 43 757
|
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}
|
15 17 11 12 16 10 19 14 20 13 18
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
14 16 10 13 19
|
|