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}
|
25 47 40 14 33 20 27 50 31 21 49 50 47 20 27 40 50 26 26 28 33 39 28 31 27
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
15 38 33 13 40 24 21 14 36 46 11 20 18 27 50 44 41 32 49 35 17 45 43 47 39
|
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}
|
8192 8192 256 256 256 2048 512 65536 1024
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
317 331 167 97 947 613 509 661 2 569
|
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 16 11 12 18 17 13 19 20 10 14
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
15 16 11 18 13
|
|