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 33 45 48 43 34 36 50 20 31 12 34 28 49 34 31 37 19 25 16 48 48 49 43 17
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
32 26 37 50 18 39 47 33 40 30 34 27 23 17 15 36 29 28 16 46 19 45 49 42 48
|
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}
|
1024 2048 65536 65536 4096 16384 32768 2048 512
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
173 587 829 743 911 179 359 281 431 421
|
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}
|
17 16 19 15 11 20 18 13 14 12 10
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
10 16 11 19 13
|
|