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}
|
46 41 39 32 39 37 43 50 44 46 50 35 43 12 47 35 26 15 34 13 45 46 49 49 17
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
20 37 15 38 22 32 33 23 24 46 31 48 29 10 36 16 14 44 39 19 41 43 42 35 17
|
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 512 2048 32768 8192 65536 512 1024 32768
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
313 373 431 223 863 487 113 829 881 457
|
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}
|
14 12 18 13 16 11 15 20 19 17 10
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
18 10 19 11 12
|
|