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}
|
50 42 23 37 20 44 46 44 25 16 16 33 11 37 46 13 30 46 44 21 17 47 32 38 42
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
21 45 42 18 38 36 31 12 11 46 20 49 37 33 40 34 29 25 22 19 13 30 48 28 32
|
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}
|
256 32768 512 4096 65536 8192 1024 4096 2048
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
353 373 541 113 149 181 373 73 97 317
|
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}
|
20 10 17 13 15 11 19 12 18 14 16
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
16 13 14 15 19
|
|