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 37 46 34 22 19 10 50 11 29 37 37 27 46 30 24 49 50 50 11 20 22 40 19 19
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
35 38 22 46 21 36 14 40 18 44 49 45 31 48 12 23 26 25 42 15 29 37 39 13 19
|
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}
|
2048 2048 65536 8192 1024 1024 65536 65536 256
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
463 443 809 163 157 113 941 587 571 761
|
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}
|
17 13 14 19 10 18 15 12 16 11 20
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
11 10 12 18 17
|
|