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}
|
35 43 37 40 26 37 21 35 29 35 30 34 47 38 40 10 26 23 39 21 30 35 35 26 39
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
35 42 45 24 41 31 27 47 39 17 15 49 30 18 20 36 29 48 33 10 11 12 38 28 32
|
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}
|
256 4096 16384 1024 1024 16384 512 1024 512
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
103 131 383 173 3 389 379 463 103 509
|
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 11 14 15 12 13 17 19 18 10 20
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
16 12 14 13 17
|
|