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}
|
43 25 38 34 23 43 49 33 11 21 15 35 38 26 32 39 46 18 39 47 13 15 47 11 40
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
40 41 48 14 34 13 37 10 42 50 21 46 24 32 29 31 49 33 11 39 23 22 17 12 18
|
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}
|
16384 512 8192 8192 4096 8192 2048 32768 512
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
59 107 223 523 263 67 131 787 997 127
|
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 15 13 12 14 11 18 17 16 20 10
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
10 20 19 14 18
|
|