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}
|
41 27 40 40 38 19 33 33 37 44 43 48 25 18 19 50 44 20 40 33 10 31 17 21 15
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
36 30 44 33 25 47 41 26 31 28 35 38 40 39 49 34 22 42 11 13 37 45 21 46 15
|
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 32768 8192 16384 512 65536 4096 4096 32768
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
181 719 79 17 197 977 677 641 23 211
|
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 14 18 12 19 17 11 15 13 20 10
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
12 11 14 17 13
|
|