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}
|
11 14 20 11 40 42 41 33 29 45 20 41 22 28 25 49 11 12 17 30 13 24 15 33 37
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
38 16 13 14 21 10 28 45 24 33 35 43 46 42 18 40 27 25 17 48 41 23 30 37 32
|
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 8192 32768 512 2048 1024 256 8192 256
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
631 887 827 967 883 419 859 373 257 557
|
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}
|
17 10 16 15 19 13 20 14 18 12 11
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
11 20 12 10 14
|
|