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}
|
29 13 11 26 33 30 19 49 42 16 27 20 30 26 19 41 26 36 45 33 39 33 11 26 35
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
24 31 46 30 19 13 25 47 21 27 26 37 36 35 12 20 29 23 16 17 33 28 11 42 48
|
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}
|
8192 2048 4096 16384 2048 4096 4096 65536 16384
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
797 157 43 739 641 337 83 853 821 317
|
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}
|
20 15 12 19 17 10 14 16 13 18 11
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
10 18 14 13 12
|
|