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}
|
42 33 20 33 11 28 47 49 18 24 40 26 32 47 12 29 47 33 46 16 13 34 47 46 42
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
50 37 23 29 19 34 38 22 33 36 43 20 39 35 47 21 46 32 49 28 10 27 12 13 40
|
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 65536 256 256 32768 16384 2048 1024 2048
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
337 2 61 241 193 563 739 127 983 233
|
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 17 18 11 20 10 13 15 19 12 16
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
19 14 16 18 12
|
|