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}
|
34 40 42 47 37 40 39 11 26 29 40 35 24 43 25 42 21 13 33 21 24 16 30 21 50
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
42 17 25 39 14 12 29 45 18 50 13 26 44 38 37 36 22 33 47 48 41 30 40 49 16
|
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}
|
2048 1024 8192 16384 4096 2048 16384 512 65536
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
109 811 433 67 739 277 479 577 829 997
|
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 19 13 20 10 17 11 18 15 14 12
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
14 18 15 11 20
|
|