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}
|
43 23 18 34 46 20 47 18 46 25 26 25 30 50 36 25 41 50 10 14 37 36 22 43 35
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
32 28 27 38 37 13 19 16 50 47 26 35 31 46 42 45 44 41 34 15 22 43 30 17 40
|
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 65536 2048 2048 65536 32768 16384 1024 512
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
491 773 719 653 101 797 431 613 197 643
|
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 13 12 18 11 10 17 20 19 15 14
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
18 17 12 11 14
|
|