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}
|
34 34 29 16 22 23 18 28 13 37 25 14 21 41 14 34 28 27 49 15 32 43 29 35 12
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
44 26 40 49 28 15 22 46 50 25 14 10 33 41 47 30 19 11 45 24 36 12 48 39 31
|
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}
|
8192 8192 1024 1024 65536 8192 256 4096 1024
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
421 661 947 751 739 461 761 733 967 101
|
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 20 11 16 15 13 12 17 19 10 18
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
19 16 11 20 12
|
|