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}
|
25 29 41 24 36 23 45 44 49 44 44 19 10 29 42 14 26 28 42 42 32 19 17 25 33
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
26 32 36 18 28 33 15 37 46 45 50 43 17 22 24 40 41 20 48 19 34 16 44 13 10
|
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}
|
512 2048 65536 32768 16384 4096 256 32768 32768
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
487 283 71 5 881 263 389 401 941 241
|
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 13 10 11 15 12 19 16 17 20 14
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
19 18 10 11 14
|
|