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}
|
48 21 19 45 19 19 25 14 33 46 41 12 37 30 23 11 17 25 36 46 46 39 25 29 22
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
31 38 18 14 34 11 50 37 12 16 32 26 45 20 22 28 47 49 33 13 27 43 48 39 30
|
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}
|
512 256 32768 8192 256 65536 2048 8192 16384
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
347 107 461 859 277 631 139 227 293 163
|
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 16 13 15 11 17 12 20 14 10 19
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
18 10 20 17 19
|
|