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}
|
39 15 37 21 50 16 35 14 37 39 23 21 48 10 36 33 34 10 46 17 43 34 20 33 36
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
24 13 48 16 40 38 33 49 41 37 39 14 34 23 43 19 42 15 44 17 45 29 12 31 10
|
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}
|
512 32768 32768 2048 16384 8192 256 16384 1024
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
857 197 373 131 223 487 283 73 607 863
|
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 10 13 14 20 15 11 19 17 12 18
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
14 10 19 13 16
|
|