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 41 34 48 18 11 29 39 33 41 17 30 49 43 12 36 39 47 17 43 13 13 32 41 15
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
32 12 46 14 18 47 37 20 19 48 10 33 13 15 44 39 36 11 49 24 29 21 45 31 27
|
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}
|
32768 8192 1024 32768 32768 8192 32768 1024 4096
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
79 127 307 271 601 239 139 349 109 223
|
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}
|
15 16 17 12 14 10 13 18 20 19 11
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
16 19 11 14 12
|
|