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}
|
19 24 31 39 31 20 47 10 43 18 29 23 42 37 34 31 24 13 49 41 38 39 37 42 10
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
36 41 48 11 12 16 19 21 44 29 50 40 49 43 14 20 42 30 27 46 45 47 26 15 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}
|
512 16384 512 256 256 16384 2048 32768 32768
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
241 59 571 127 937 389 757 23 919 157
|
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}
|
19 17 14 20 10 12 11 16 18 13 15
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
13 15 17 12 18
|
|