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}
|
25 20 12 30 30 10 40 34 17 30 19 49 30 15 44 43 27 12 24 27 14 44 26 31 32
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
30 32 31 35 21 24 27 18 46 17 22 40 16 14 13 43 50 29 15 39 19 10 49 41 28
|
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 256 1024 1024 2048 512 512 65536 32768
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
73 691 199 727 701 617 67 337 409 197
|
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}
|
18 11 12 10 15 13 16 14 19 17 20
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
14 20 19 17 15
|
|