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}
|
18 25 12 35 35 44 47 47 22 44 38 38 34 27 47 12 33 47 15 17 44 42 26 41 24
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
32 41 27 37 49 44 26 31 34 35 42 15 29 43 45 39 19 28 40 12 33 48 20 13 47
|
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 4096 4096 65536 32768 8192 8192 512 4096
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
191 421 541 193 137 523 571 173 883 821
|
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 13 15 18 11 10 12 14 17 20 16
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
10 18 17 20 12
|
|