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}
|
23 11 10 48 49 13 30 25 12 31 21 40 28 40 21 23 27 13 35 50 42 30 45 31 13
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
14 24 31 39 20 35 47 16 15 41 29 19 21 48 45 34 43 37 44 17 36 30 25 40 46
|
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 512 16384 512 65536 32768 4096 4096 8192
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
503 881 487 241 283 251 193 659 79 569
|
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}
|
11 16 15 14 12 19 20 13 18 10 17
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
15 20 14 12 19
|
|