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}
|
44 10 40 39 33 47 30 35 41 28 13 45 41 50 47 42 19 36 40 22 36 15 38 14 34
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
48 15 47 20 43 35 14 37 49 25 40 27 12 21 24 34 11 17 19 26 32 38 16 33 44
|
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}
|
8192 65536 32768 65536 8192 256 4096 512 16384
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
859 739 137 269 757 787 5 227 233 751
|
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}
|
19 13 15 14 12 20 16 17 10 11 18
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
15 20 16 12 17
|
|