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}
|
43 32 11 48 32 27 28 49 14 14 19 10 45 26 26 29 27 38 48 37 34 29 49 42 39
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
24 32 15 17 19 39 12 41 37 21 16 40 20 49 46 50 35 11 43 34 31 33 45 27 44
|
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 16384 256 8192 65536 8192 256 256 65536
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
103 181 563 167 373 17 859 821 659 829
|
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}
|
18 13 15 17 20 12 11 10 14 19 16
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
18 11 16 20 15
|
|