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}
|
17 39 43 17 45 10 24 44 29 41 11 23 42 50 16 48 35 10 49 15 22 25 31 28 33
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
15 43 41 27 25 50 24 17 21 29 12 30 35 31 37 46 38 13 16 26 40 32 14 44 47
|
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 4096 2048 256 8192 65536 65536 4096 512
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
311 809 461 433 199 257 101 421 509 293
|
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}
|
20 17 11 13 14 15 10 18 12 16 19
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
12 15 18 10 16
|
|