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}
|
16 41 39 42 45 33 38 39 18 33 14 23 27 40 18 12 29 31 13 33 37 19 47 38 18
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
44 38 18 15 31 19 47 29 37 34 39 27 17 24 45 43 48 20 30 11 36 23 41 26 40
|
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}
|
1024 65536 16384 256 8192 1024 4096 2048 4096
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
487 971 739 43 541 349 101 311 521 197
|
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 14 18 12 16 13 19 11 10 20 17
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
15 16 11 10 18
|
|