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}
|
15 32 42 16 33 17 23 35 22 46 27 20 45 48 19 36 35 27 43 21 42 34 31 32 38
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
47 36 50 14 43 11 30 27 29 33 46 23 41 21 34 20 16 39 19 18 49 12 25 24 38
|
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 2048 512 65536 65536 65536 8192 16384 8192
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
683 839 691 523 337 373 263 211 647 503
|
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 14 18 17 12 13 10 20 15 16 11
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
18 10 14 12 13
|
|