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}
|
23 32 31 13 41 42 38 30 49 40 42 22 45 30 27 12 39 22 10 32 45 15 41 49 50
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
48 34 15 25 17 28 13 26 37 20 36 38 31 16 27 44 42 45 19 46 40 10 41 14 43
|
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 2048 65536 8192 256 2048 1024 512 256
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
599 271 571 967 89 359 691 491 241 419
|
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}
|
11 19 14 16 15 20 13 12 18 17 10
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
10 15 14 18 13
|
|