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}
|
48 47 14 37 45 27 10 26 26 47 12 25 48 47 28 44 23 25 40 29 16 50 44 35 24
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
26 46 42 36 18 25 13 39 37 31 22 17 23 33 34 45 14 10 27 50 19 28 24 21 38
|
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}
|
65536 65536 4096 8192 65536 16384 512 1024 65536
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
29 601 59 691 601 983 967 59 61 13
|
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}
|
13 18 11 14 16 19 10 17 20 12 15
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
12 11 13 17 20
|
|