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}
|
49 49 21 14 40 10 41 21 35 39 23 36 32 48 22 15 17 31 28 23 38 46 42 31 24
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
18 47 17 45 43 44 36 10 15 23 49 30 34 40 11 38 14 20 28 32 37 31 46 24 26
|
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}
|
4096 8192 512 32768 8192 4096 32768 65536 1024
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
23 967 313 17 593 911 397 691 569 823
|
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}
|
15 12 16 14 19 11 17 18 13 20 10
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
14 19 10 15 16
|
|