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}
|
16 30 32 47 11 20 40 31 38 30 16 26 42 32 40 38 24 33 38 28 23 41 50 15 45
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
12 27 13 15 50 42 45 24 43 29 14 17 44 20 11 22 10 26 48 31 32 25 39 23 19
|
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}
|
256 256 16384 512 2048 4096 16384 1024 2048
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
797 743 181 233 433 599 421 761 271 797
|
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}
|
15 20 12 11 19 16 14 18 10 13 17
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
19 16 20 18 10
|
|