Examples

Examples ! Many are generated and do not always make sence,
the examples from 'specials' are hand crafted and gives a good view of what the Sequences subsystem of PAD can do.



sequences | specials | random | play/single | play/double | keepRemoveFlag

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}
17 24 40 37 29 43 20 30 34 37 15 22 13 25 48 50 50 44 17 14 45 45 29 46 42
{sequence random, rows=25, minimal=10, maximal=50, unique } {$sequence} {/sequence}
40 30 44 24 45 18 13 46 33 27 28 41 47 21 12 10 31 14 35 16 20 23 26 11 38

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}
16384 2048 8192 4096 512 1024 512 256 4096
{sequence prime,   rows=10, randomly, to=1000      } {$sequence} {/sequence}
269 631 239 71 631 163 701 733 599 769

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}
15 20 13 17 10 12 14 16 11 18 19
{mySeq randomize=5} {$sequence} {/mySeq}
11 14 20 16 18