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}
|
40 47 19 46 41 33 17 15 29 30 50 35 10 23 36 23 23 48 14 49 22 41 13 13 21
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
46 18 45 47 35 41 40 34 48 31 25 21 43 37 28 36 33 20 30 10 12 27 14 23 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}
|
1024 16384 8192 32768 4096 512 32768 512 4096
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
641 983 617 829 409 557 607 523 433 983
|
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 18 20 14 13 12 16 15 10 11 19
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
17 19 14 15 13
|
|