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}
|
27 45 39 42 26 36 29 21 36 21 47 27 24 19 32 18 17 12 47 40 18 33 21 30 20
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
40 47 45 26 13 43 32 25 11 44 48 37 12 34 24 46 36 27 14 39 31 21 10 41 17
|
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 1024 512 512 8192 16384 4096 16384
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
991 23 251 839 89 131 859 643 761 79
|
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 15 13 14 19 10 17 20 12 16 11
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
14 10 18 20 19
|
|