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}
|
50 18 22 50 23 30 40 10 24 30 47 40 28 42 25 37 40 31 19 29 30 48 47 50 36
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
18 17 37 41 16 32 13 23 14 22 36 40 27 42 15 24 21 12 26 44 33 35 10 48 39
|
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 65536 16384 2048 256 256 1024 32768 16384
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
577 599 983 571 13 137 31 383 797 587
|
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}
|
14 18 19 17 10 16 20 11 15 13 12
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
16 13 15 11 12
|
|