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 12 16 32 32 23 35 16 29 24 48 47 18 43 20 38 14 29 10 15 30 24 29 41 49
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
44 12 33 46 31 40 15 17 20 30 23 16 21 34 24 13 38 28 11 41 19 35 49 47 37
|
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}
|
1024 1024 16384 2048 512 512 65536 16384 8192
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
743 29 619 2 971 353 313 853 503 353
|
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}
|
13 17 10 12 20 16 11 15 14 19 18
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
19 14 11 10 18
|
|