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}
|
18 12 40 45 16 35 49 41 26 45 37 27 50 49 17 40 47 45 35 29 43 45 28 49 21
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
37 30 24 45 26 47 39 43 38 15 23 36 49 28 18 32 14 50 42 27 34 44 29 10 17
|
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 1024 512 65536 32768 256 65536 65536 1024
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
337 97 421 109 643 167 967 173 59 653
|
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 17 20 11 19 15 18 16 10 14 12
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
14 12 17 13 15
|
|