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}
|
47 47 41 47 42 47 21 27 32 30 22 10 43 15 10 26 12 25 11 42 32 18 11 26 24
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
35 25 20 40 39 22 32 48 16 33 18 27 17 45 30 42 31 11 14 34 50 49 24 29 37
|
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}
|
1024 8192 256 32768 32768 512 256 32768 8192
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
383 211 641 443 853 397 409 151 733 571
|
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 16 10 20 18 13 17 14 15 12 19
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
14 13 16 18 17
|
|