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}
|
30 23 10 49 25 33 10 42 10 31 39 24 16 27 41 34 21 45 40 27 36 32 33 42 12
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
13 17 43 35 26 38 31 11 21 15 20 34 32 49 23 19 46 41 29 12 37 44 14 50 36
|
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}
|
4096 65536 1024 512 2048 65536 1024 4096 65536
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
727 137 197 401 499 89 653 101 677 199
|
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 18 10 15 16 17 19 20 13 12 14
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
12 14 11 18 10
|
|