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}
|
21 27 49 49 35 10 35 30 27 24 27 28 23 16 40 42 33 38 44 28 48 13 22 40 50
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
17 19 34 20 28 38 14 16 44 36 35 45 43 21 39 15 46 12 49 18 40 37 26 24 10
|
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 256 16384 256 256 65536 256 256 8192
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
443 421 853 479 853 43 911 347 811 139
|
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}
|
17 16 19 20 12 10 14 18 15 11 13
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
14 15 18 17 19
|
|