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}
|
32 44 22 21 15 42 19 31 41 43 21 25 18 11 45 39 11 41 31 35 49 35 12 44 24
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
45 26 38 28 49 48 33 47 12 10 41 29 25 14 37 35 40 42 23 16 30 11 44 50 46
|
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 65536 2048 16384 4096 256 32768 65536 65536
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
457 389 193 241 487 593 43 883 919 79
|
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}
|
11 12 10 20 14 19 18 16 15 13 17
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
10 14 19 12 16
|
|