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}
|
48 34 49 21 32 28 41 32 16 30 30 31 41 19 31 41 39 22 47 17 20 12 22 48 31
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
37 13 28 38 47 22 27 19 50 16 21 48 40 17 41 39 49 33 42 31 24 20 46 36 45
|
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}
|
16384 2048 4096 65536 65536 16384 8192 32768 65536
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
181 547 809 773 509 673 547 397 821 409
|
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}
|
14 19 17 10 16 20 15 18 12 11 13
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
11 19 14 15 13
|
|