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}
|
39 35 14 41 26 21 42 25 41 45 12 24 13 38 36 31 18 24 13 48 16 20 28 40 19
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
24 13 16 40 15 18 20 38 30 10 41 21 26 42 45 32 19 35 23 11 31 36 39 27 14
|
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}
|
8192 4096 16384 32768 8192 256 32768 16384 65536
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
701 47 433 991 251 433 613 563 769 3
|
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 10 11 12 14 19 16 13 20 15 17
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
16 17 13 15 14
|
|