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 12 40 19 11 26 34 34 34 41 11 50 15 50 45 36 41 44 40 22 47 32 21 48 37
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
39 15 16 30 31 46 35 33 22 25 24 42 37 19 28 40 45 10 18 29 26 21 48 27 20
|
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 1024 1024 1024 256 4096 65536 2048 32768
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
313 523 709 199 457 659 233 439 179 461
|
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}
|
10 15 14 19 16 11 12 18 13 20 17
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
17 10 12 11 13
|
|