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}
|
13 36 40 25 27 15 47 40 12 25 14 37 13 26 19 33 22 42 40 27 13 41 21 38 13
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
13 29 17 49 11 18 15 12 31 25 43 48 20 21 46 24 44 40 33 45 35 27 16 36 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}
|
16384 4096 8192 16384 32768 2048 1024 512 1024
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
13 167 67 349 463 353 757 983 13 239
|
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}
|
13 19 15 11 12 14 20 10 17 16 18
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
15 17 11 20 14
|
|