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}
|
14 16 11 24 35 26 20 18 32 38 38 25 47 28 12 33 28 43 37 20 50 48 31 17 45
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
16 32 19 17 14 11 47 33 28 37 10 30 23 40 22 13 41 50 20 18 29 42 21 43 15
|
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 16384 32768 65536 256 256 8192 256
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
83 479 911 877 907 461 719 331 647 163
|
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}
|
19 15 13 16 17 11 10 12 14 20 18
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
19 16 12 18 11
|
|