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}
|
47 35 37 50 41 42 27 38 42 31 42 44 44 30 27 50 18 30 18 11 50 27 45 17 43
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
49 19 35 47 12 18 10 30 11 31 46 43 34 25 13 50 23 42 17 32 26 16 33 48 37
|
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 65536 16384 2048 8192 1024 1024 32768 32768
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
859 353 367 283 547 919 599 29 167 313
|
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}
|
19 17 16 10 13 14 20 18 15 11 12
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
10 13 19 16 11
|
|