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}
|
13 27 22 38 49 39 27 25 16 26 26 50 24 12 28 14 19 28 16 50 25 13 36 46 16
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
43 16 34 49 31 40 41 48 38 44 45 20 42 13 29 21 26 36 24 25 19 18 35 27 28
|
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}
|
2048 65536 65536 65536 1024 512 16384 2048 1024
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
11 457 619 631 373 397 773 853 613 373
|
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}
|
11 18 20 17 16 15 19 10 12 13 14
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
13 17 10 20 11
|
|