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}
|
50 36 30 41 19 33 17 34 20 46 43 21 35 47 24 17 17 11 32 48 48 42 43 39 42
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
29 18 19 34 13 38 14 44 15 21 41 12 10 47 33 50 22 26 11 24 39 40 46 42 28
|
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}
|
16384 256 16384 65536 16384 32768 256 1024 65536
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
523 647 239 379 677 179 353 673 241 233
|
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 15 14 19 13 12 17 20 10 11 18
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
10 12 15 18 19
|
|