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}
|
21 41 46 38 28 20 41 44 21 36 41 38 16 23 23 48 38 10 10 43 20 41 17 30 37
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
21 20 48 49 13 23 36 14 26 34 46 47 24 19 29 37 31 16 39 18 33 40 12 10 27
|
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}
|
16384 32768 32768 512 32768 32768 2048 65536 2048
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
503 881 163 941 113 983 53 37 227 821
|
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}
|
16 13 14 18 17 20 11 12 19 10 15
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
20 15 19 11 12
|
|