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}
|
43 39 19 45 33 22 20 45 22 44 40 26 48 25 28 21 34 26 32 32 27 46 39 34 16
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
22 41 48 12 37 20 31 17 14 29 35 18 28 23 44 33 15 13 11 49 32 10 36 27 25
|
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}
|
4096 8192 256 8192 2048 32768 512 8192 16384
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
131 509 887 2 647 467 811 97 677 383
|
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}
|
11 15 16 19 20 13 12 17 18 14 10
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
13 15 17 11 20
|
|