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}
|
48 49 33 34 20 17 33 43 42 35 25 30 11 23 30 16 38 25 16 30 39 11 43 44 39
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
36 27 11 30 15 31 22 19 23 48 50 46 14 12 26 17 13 37 35 10 40 39 33 21 38
|
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 32768 32768 4096 4096 16384 16384 16384 8192
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
797 877 163 601 5 353 661 157 751 547
|
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}
|
14 15 19 17 18 13 11 10 12 20 16
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
15 19 13 17 11
|
|