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}
|
35 22 31 39 17 10 26 21 46 11 23 37 32 36 25 10 22 41 24 10 32 15 35 12 10
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
48 40 28 29 44 43 16 14 12 38 35 15 42 21 46 27 47 20 10 32 11 25 22 45 30
|
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 1024 32768 4096 16384 16384 2048 65536
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
131 653 853 853 199 193 29 587 181 313
|
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 16 15 12 14 10 17 18 20 11 13
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
17 16 13 15 12
|
|