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}
|
41 19 32 13 22 44 25 44 13 18 29 38 28 21 14 45 36 30 31 45 35 19 42 47 38
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
37 23 33 20 47 38 17 49 21 36 22 31 39 43 18 48 29 28 27 24 25 15 13 32 44
|
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}
|
8192 512 16384 65536 512 32768 32768 4096 1024
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
733 41 449 557 439 271 691 409 683 787
|
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 14 12 13 18 15 20 11 10 19
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
12 17 11 10 13
|
|