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}
|
31 42 38 36 24 20 20 22 36 32 13 37 47 44 13 35 39 17 49 42 40 49 36 50 15
|
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
|
31 29 23 19 16 10 35 17 47 21 32 22 30 12 39 48 44 13 36 24 37 43 38 41 49
|
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}
|
256 2048 8192 4096 2048 2048 32768 32768 65536
|
{sequence prime, rows=10, randomly, to=1000 } {$sequence} {/sequence}
|
229 431 37 811 373 223 787 263 157 937
|
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}
|
17 14 16 13 19 12 11 20 18 15 10
|
{mySeq randomize=5} {$sequence} {/mySeq}
|
11 20 16 14 12
|
|