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}
|
31 38 10 40 26 32 41 47 33 27 33 50 19 32 22 37 50 39 31 43 22 39 49 38 30
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
50 46 48 41 34 22 49 44 32 28 31 40 47 29 33 15 19 12 20 17 45 36 11 10 16
|
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}
|
4096 512 1024 512 65536 65536 2048 65536 8192
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
523 691 281 739 107 857 37 419 661 653
|
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}
|
14 18 10 17 15 13 11 16 20 12 19
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
18 13 14 15 11
|
|