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}
|
36 47 21 17 20 21 31 21 38 47 17 23 37 33 29 38 18 13 35 29 33 18 32 30 47
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
45 33 37 42 14 24 22 41 31 17 11 46 32 20 28 16 50 30 15 19 44 36 10 12 39
|
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 2048 32768 32768 512 4096 1024 32768 65536
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
557 569 5 199 59 643 613 853 557 193
|
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}
|
15 16 13 12 18 19 11 10 14 17 20
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
12 11 18 15 10
|
|