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}
|
28 38 10 24 29 15 15 25 50 20 23 45 22 33 35 30 44 38 39 37 42 21 40 39 23
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
20 42 43 21 18 13 29 28 10 48 32 12 35 15 49 19 14 31 33 34 16 25 38 23 24
|
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 65536 8192 65536 256 512 1024 65536 512
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
157 47 19 349 409 2 821 467 569 131
|
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 13 11 12 16 10 15 20 19 14 18
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
15 16 11 14 10
|
|