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}
|
18 35 50 47 45 42 10 46 45 18 49 25 23 10 48 17 17 15 44 48 49 47 44 24 18
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
18 10 47 12 11 46 15 21 16 23 50 41 34 32 35 37 38 31 43 20 27 49 22 39 25
|
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 65536 1024 512 1024 16384 256 1024 256
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
139 523 331 149 787 491 109 971 311 757
|
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 15 13 11 10 17 19 20 16 12
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
20 17 15 19 14
|
|