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}
|
12 39 37 47 10 20 33 36 41 48 28 33 35 43 44 19 44 18 46 49 41 25 44 29 34
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
21 12 47 36 13 18 46 10 25 34 30 44 48 19 23 50 38 27 37 16 43 45 11 35 28
|
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}
|
1024 8192 2048 256 512 512 65536 32768 2048
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
463 719 113 953 43 401 29 317 461 859
|
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}
|
16 17 12 10 14 20 15 19 13 11 18
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
15 11 19 16 13
|
|