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 14 33 15 43 16 37 49 10 30 29 14 14 39 18 38 13 33 16 12 47 24 23 21 44
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
14 20 18 41 17 36 22 19 27 12 33 11 44 37 13 16 21 40 28 30 48 46 42 47 35
|
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}
|
256 2048 32768 4096 2048 2048 32768 512 2048
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
733 691 139 641 311 349 701 547 353 577
|
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}
|
15 19 16 11 17 10 12 20 18 14 13
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
16 13 17 14 18
|
|