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}
|
32 38 18 21 22 32 37 16 32 33 43 10 42 21 37 16 50 28 32 28 26 30 31 50 10
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
42 32 28 12 13 50 46 19 22 10 29 16 17 47 34 35 45 44 48 24 18 37 40 43 11
|
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 256 16384 512 1024 8192 2048 512 2048
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
227 199 997 859 367 757 19 109 271 691
|
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 19 15 20 11 18 12 13 16 10 17
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
11 20 15 18 12
|
|