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}
|
11 30 39 12 45 49 48 44 17 16 19 45 43 35 34 25 22 23 27 17 33 49 50 34 45
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
34 36 12 46 37 30 25 11 31 33 14 49 15 23 38 50 18 28 45 32 48 43 42 24 22
|
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}
|
65536 256 256 1024 65536 512 512 65536 8192
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
479 797 71 827 659 73 509 43 601 2
|
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}
|
10 19 16 13 20 18 12 17 11 14 15
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
16 11 17 12 18
|
|