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 47 24 14 33 36 25 24 19 23 15 29 39 24 41 11 24 23 37 15 46 41 50 29
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
12 24 19 37 15 48 17 50 36 31 20 16 23 45 38 33 41 34 44 30 43 47 25 11 42
|
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}
|
2048 4096 16384 32768 2048 32768 4096 16384 65536
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
839 709 107 641 197 379 461 89 17 997
|
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 14 12 13 20 15 10 16 19 11 17
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
11 10 16 19 20
|
|