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 36 39 38 32 18 19 29 30 37 49 18 48 11 41 43 40 46 48 13 16 42 20 36 34
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
30 45 49 22 28 34 33 47 43 23 24 40 32 38 12 31 10 35 26 20 25 36 50 27 11
|
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}
|
512 65536 16384 512 256 65536 8192 32768 2048
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
67 839 223 787 151 2 37 727 709 643
|
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}
|
18 13 16 12 15 20 14 11 19 17 10
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
11 19 14 13 17
|
|