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}
|
11 10 47 46 26 17 39 11 24 35 24 30 25 41 49 16 44 49 26 40 13 40 50 17 41
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
31 36 18 12 25 43 11 47 42 14 33 35 37 46 29 13 50 39 19 20 27 40 23 38 34
|
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}
|
65536 32768 1024 512 32768 16384 1024 256 1024
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
199 907 709 397 911 173 677 293 293 193
|
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 19 13 17 20 18 11 14 12 15 10
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
19 15 20 18 11
|
|