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}
|
44 37 26 31 34 18 33 49 29 38 47 19 31 33 49 12 45 34 23 50 33 24 18 43 40
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
41 38 49 26 17 23 28 33 35 29 12 44 40 15 46 42 32 10 31 16 24 50 22 18 25
|
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}
|
512 2048 2048 65536 2048 1024 16384 65536 512
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
523 179 757 613 547 379 829 997 659 641
|
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}
|
20 18 12 17 13 16 19 15 11 14 10
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
18 16 11 17 10
|
|