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}
|
26 22 28 41 36 50 43 37 14 42 14 31 18 34 13 17 33 14 24 43 41 39 23 45 25
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
26 31 12 28 17 46 49 22 39 38 42 21 13 15 33 25 23 44 24 48 34 20 32 11 47
|
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}
|
32768 65536 256 512 1024 32768 16384 256 256
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
541 139 719 401 383 521 17 229 3 877
|
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}
|
15 13 12 16 10 19 14 18 11 20 17
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
19 10 18 12 15
|
|