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}
|
28 44 19 26 33 10 33 40 27 43 26 45 11 18 12 37 19 32 41 13 26 12 11 33 49
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
44 30 34 21 18 35 36 49 38 22 27 24 17 29 10 39 28 50 45 37 19 15 32 11 16
|
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 1024 32768 2048 2048 32768 16384
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
647 359 17 167 59 367 499 811 313 89
|
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}
|
10 18 14 19 13 15 11 20 12 16 17
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
19 11 12 13 16
|
|