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}
|
29 45 35 28 44 31 34 26 11 45 20 34 25 19 15 37 44 45 46 37 38 38 14 37 16
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
46 25 11 50 40 30 32 38 33 22 28 48 37 10 26 18 43 13 17 15 44 27 41 20 23
|
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 8192 2048 32768 512 1024 1024 65536 32768
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
281 937 61 757 487 13 479 547 5 839
|
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 10 12 15 11 14 13 19 20 16
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
16 11 15 10 12
|
|