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}
|
15 28 12 12 32 50 46 15 33 47 25 19 35 48 30 21 21 18 37 29 31 49 16 40 33
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
23 29 10 49 12 40 41 35 44 13 42 11 27 48 14 37 34 31 39 38 28 17 19 21 26
|
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 512 1024 65536 32768 32768 1024 16384 2048
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
151 811 349 821 487 853 569 827 29 809
|
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}
|
19 13 15 14 16 20 17 10 12 11 18
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
12 13 20 17 19
|
|