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}
|
34 28 37 37 35 26 12 19 16 14 27 33 37 29 41 14 48 11 41 45 34 37 18 37 35
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
36 27 29 49 26 11 16 40 19 47 38 28 15 21 30 25 20 23 37 32 33 22 31 46 45
|
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}
|
4096 512 4096 65536 4096 8192 16384 65536 32768
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
307 503 313 599 23 53 797 193 17 67
|
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 19 15 10 14 16 20 12 13 11 18
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
15 20 13 17 18
|
|