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}
|
19 37 33 10 10 41 48 33 27 43 23 36 48 19 39 29 34 14 18 27 50 16 25 29 19
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
21 33 46 14 10 24 26 15 40 27 16 44 42 38 23 32 13 37 11 36 20 31 30 12 47
|
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 2048 512 65536 32768 1024 256 1024 512
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
647 283 461 509 43 887 2 181 569 661
|
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}
|
16 18 15 14 11 12 10 17 19 13 20
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
15 12 11 20 13
|
|