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 40 16 15 10 34 29 46 48 41 40 27 30 21 44 41 50 36 23 35 45 11 25 27 20
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
34 30 36 25 23 17 27 32 39 15 33 29 38 10 24 19 46 22 50 20 28 49 37 31 35
|
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}
|
65536 32768 256 1024 8192 256 2048 32768 65536
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
167 397 311 509 859 599 313 313 13 233
|
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 19 18 14 20 17 15 12 10 16 11
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
15 19 13 17 18
|
|