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}
|
41 47 30 46 47 19 31 24 17 38 19 32 50 45 11 34 44 36 35 11 47 41 18 25 38
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
24 31 42 39 16 41 18 15 33 25 21 49 17 48 29 37 12 35 20 13 22 50 43 10 40
|
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 2048 8192 2048 16384 32768 512 512
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
659 967 167 179 283 383 557 881 911 659
|
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}
|
19 20 17 10 14 15 18 13 16 11 12
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
20 14 11 12 13
|
|