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}
|
18 13 42 18 27 11 10 16 27 43 25 22 11 38 25 29 46 48 17 27 19 18 32 29 45
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
27 37 50 45 10 34 26 32 30 41 23 47 36 44 21 35 24 25 14 20 38 16 12 17 22
|
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}
|
512 1024 512 8192 1024 256 512 8192 32768
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
787 43 571 709 433 283 569 461 499 557
|
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}
|
18 19 17 20 16 13 10 15 12 11 14
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
17 18 10 13 19
|
|