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}
|
17 19 47 11 38 22 22 19 35 10 31 21 28 33 34 39 39 23 36 27 30 11 41 25 12
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
15 24 22 31 43 33 37 13 26 29 14 27 41 20 44 12 25 48 23 46 16 35 39 47 19
|
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 256 16384 256 512 8192 4096 512 256
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
887 467 59 593 823 197 859 743 241 89
|
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 15 20 17 13 16 10 19 18 12 14
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
11 10 19 17 13
|
|