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}
|
20 31 47 27 14 21 30 36 20 49 37 47 38 27 14 43 14 24 42 28 47 36 17 13 15
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
34 12 30 45 39 25 36 13 35 42 20 21 24 26 32 14 18 31 44 41 47 50 17 43 22
|
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 512 8192 8192 256 32768 4096 32768 4096
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
73 401 757 461 313 103 3 479 547 11
|
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 18 20 17 16 13 14 15 10 11 12
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
17 15 19 18 20
|
|