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}
|
42 28 36 23 48 23 31 49 20 11 20 41 49 35 13 33 31 30 24 46 50 13 42 25 24
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
23 38 15 16 20 29 17 36 21 12 27 40 28 41 26 43 18 13 30 42 45 50 10 11 31
|
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 4096 512 16384 32768 65536 1024 8192 4096
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
263 271 179 853 619 269 727 23 719 31
|
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}
|
12 17 14 20 16 10 11 19 13 15 18
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
14 20 11 12 16
|
|