Class | Data Declaration command |
Name | <cmd> { ... } |
Arguments | ...{ (<val1> <val2> ...<valN>) | (<val1> : <val2>) | ($[mxqa]) } ... |
Repeat the associated command, placing each value of the iterator list into the position the list currently occupies. There may be multiple iterators, and iterator lists may be nested. A sequence of integers can be specified by start and end values separated by a colon. These macro commands allows a certain amount of the functionality of proper computer languages:
Iteration over a range of numerical values of a function | sml {0.1 0.3 0.5} 1 0 0 |
Iteration over a range of loci of a function | tab a1 {m1 m2} |
Iteration over a range of functions | {tdt ass} a1 |
Combinatorial generation of strings eg locus names | set loc a{1 : 3}{1 : 3} aff |
Compound statements | if (male) then m{1 2}=x |
Note that more powerful manipulations are available from the Scheme language by composing the command then using the run procedure.
Example:
>> {1 2} + 1 => 2. => 3. >> set loc a{b 2 3} aff; ls ab* a2* a3* 3 active traits; 0 active markers. >> echo {1 : 3}{3 : 1} 13 12 11 23 22 21 33 32 31
<< (eval) | Up to index | >> (set datadirectory) |