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}
|
11 30 32 24 23 47 12 28 31 20 26 44 44 26 19 47 20 48 11 23 29 28 23 30 26
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
43 40 11 22 41 47 37 26 14 34 36 48 42 13 49 17 33 46 19 10 15 45 23 28 30
|
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}
|
32768 8192 1024 65536 32768 4096 32768 4096 2048
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
577 797 89 797 811 797 941 881 509 257
|
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}
|
18 20 10 15 19 13 14 12 11 17 16
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
15 13 18 10 11
|
|