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 40 15 29 39 39 37 13 10 34 46 49 22 18 49 38 45 24 22 26 28 24 24 18 40
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
31 27 10 47 20 32 42 37 13 18 49 38 22 43 19 11 29 12 14 17 44 36 15 45 28
|
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}
|
32768 512 8192 512 65536 8192 512 1024 16384
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
619 761 647 271 113 61 149 467 409 523
|
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}
|
16 10 11 17 14 19 12 18 15 20 13
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
18 15 19 10 20
|
|