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}
|
23 34 25 23 36 10 32 38 26 31 45 33 48 50 18 23 31 19 31 18 35 50 30 50 31
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
18 49 30 46 11 41 33 21 26 10 28 25 38 12 27 24 20 40 45 32 35 39 23 15 50
|
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}
|
256 32768 16384 16384 512 16384 4096 65536 256
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
167 59 337 2 79 397 751 797 631 379
|
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 12 15 13 18 14 10 11 17 20 19
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
12 18 10 17 13
|
|