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}
|
33 36 12 35 48 48 20 44 48 48 50 14 19 25 15 44 18 31 16 26 11 19 47 12 37
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
26 23 22 24 16 14 19 17 31 50 47 41 40 12 38 37 33 39 10 34 28 32 25 13 42
|
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}
|
4096 256 256 512 1024 512 65536 65536 32768
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
521 739 167 373 757 691 307 523 677 941
|
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}
|
11 19 10 17 15 13 20 18 16 14 12
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
14 19 13 10 17
|
|