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 50 12 49 14 11 46 21 26 33 35 12 16 46 21 40 21 42 43 41 26 27 18 18 46
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
38 20 40 21 42 36 43 45 50 39 32 31 25 44 13 18 33 49 12 14 24 10 27 34 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}
|
32768 16384 4096 16384 32768 32768 65536 256 32768
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
163 563 349 17 139 911 349 107 53 827
|
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 17 10 18 12 16 20 14 15 13 11
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
12 11 13 19 10
|
|