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}
|
21 41 34 37 21 24 29 33 24 37 10 49 41 28 14 11 29 23 49 15 20 35 33 37 40
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
34 46 50 48 16 17 32 11 24 38 14 30 18 40 31 35 29 13 47 42 19 10 36 22 33
|
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 65536 32768 2048 2048 65536 1024 4096 8192
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
691 127 167 743 223 653 991 191 43 211
|
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 20 10 14 17 12 16 11 19 15 18
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
13 17 19 10 18
|
|