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}
|
21 44 40 41 49 48 12 40 35 14 22 10 49 18 24 37 40 11 31 45 19 41 31 29 49
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
41 26 29 32 20 24 34 45 18 44 49 27 42 31 16 22 37 23 47 30 21 13 12 40 11
|
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}
|
32768 16384 4096 8192 1024 65536 1024 1024 2048
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
491 829 757 619 619 929 439 307 739 919
|
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 16 11 20 12 13 18 15 10
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
18 10 11 16 19
|
|