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}
|
25 33 15 35 35 47 31 30 10 50 35 29 41 26 22 32 15 35 29 41 10 49 20 33 45
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
40 41 29 23 30 34 21 22 19 10 45 38 50 37 36 14 39 16 26 18 25 28 11 27 32
|
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 32768 32768 16384 2048 4096 2048 16384 2048
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
271 337 859 331 337 373 467 821 131 19
|
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 17 14 15 11 19 20 10 18 12 13
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
20 19 17 18 13
|
|