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}
|
18 41 22 29 49 35 21 31 37 19 30 39 20 12 38 33 36 10 15 41 24 18 36 34 12
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
37 24 38 12 44 10 32 23 19 45 11 42 31 47 40 22 33 34 28 17 50 29 48 49 27
|
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 1024 2048 512 32768 2048 65536 256 8192
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
857 701 907 317 557 127 227 577 467 313
|
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}
|
16 18 19 10 17 11 14 15 13 12 20
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
11 15 17 18 20
|
|