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}
|
24 23 14 41 17 14 12 30 12 15 27 30 35 18 25 23 37 36 34 35 33 29 23 30 11
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
11 33 13 22 23 34 17 39 26 49 20 37 38 48 19 27 24 35 44 25 31 42 30 36 32
|
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}
|
32768 8192 512 8192 32768 32768 65536 256 32768
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
613 67 37 431 617 479 613 809 389 313
|
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}
|
12 18 11 10 14 15 20 13 16 17 19
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
10 17 18 13 15
|
|