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}
|
24 44 41 20 42 36 45 31 11 24 11 37 15 37 30 20 15 37 44 16 36 48 46 28 19
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
40 10 48 18 36 50 41 38 49 22 26 17 43 23 35 47 19 20 31 11 45 27 21 39 13
|
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}
|
4096 16384 2048 256 1024 2048 512 2048 65536
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
109 809 53 181 839 541 313 113 587 173
|
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 13 12 19 16 18 17 10 15 14 11
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
19 10 16 13 14
|
|