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}
|
10 18 35 33 24 35 15 50 22 47 47 24 39 23 29 14 41 40 50 21 28 47 46 21 42
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
23 34 20 35 37 45 29 49 41 38 40 36 19 39 11 18 30 17 42 46 10 33 44 12 14
|
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}
|
16384 256 4096 512 65536 8192 16384 8192 65536
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
577 541 487 139 311 773 941 479 359 503
|
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}
|
16 17 11 15 12 14 20 13 18 19 10
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
16 12 18 11 14
|
|