Rev 2754 | Rev 5766 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2754 | Rev 4051 | ||
---|---|---|---|
Line 33... | Line 33... | ||
33 | will be replaced by the value of the last variable. This allows nested |
33 | will be replaced by the value of the last variable. This allows nested |
34 | substitutions, as well as substitution of a variable which is followed |
34 | substitutions, as well as substitution of a variable which is followed |
35 | by an alphanumeric character. |
35 | by an alphanumeric character. |
36 | <br>Example: if the variable $(emph)i$emphend has value $(emph)3$emphend |
36 | <br>Example: if the variable $(emph)i$emphend has value $(emph)3$emphend |
37 | and the variable $(emph)alpha3beta$emphend has value $(emph)pi$emphend, |
37 | and the variable $(emph)alpha3beta$emphend has value $(emph)pi$emphend, |
38 | the string<pre> |
38 | the string<pre>3*$$(alpha$$(i)beta)*x</pre> |
39 | 3* |
39 | will become<pre>3*pi*x</pre> |
40 | |
40 | after substitution. |
41 | <p> |
41 | <p> |
42 | Array addressing: if the variable $(emph)l$emphend contains a |
42 | Array addressing: if the variable $(emph)l$emphend contains a |
43 | comma-separated list $(emph)a,b,c,d,e$emphend, then the string |
43 | comma-separated list $(emph)a,b,c,d,e$emphend, then the string |
44 | <tt>$$(i[3])</tt> gives <tt>c</tt> after substitution, and |
44 | <tt>$$(i[3])</tt> gives <tt>c</tt> after substitution, and |
45 | <tt>$$(i[2 to 4])</tt> tives <tt>b,c,d</tt>, etc. |
45 | <tt>$$(i[2 to 4])</tt> tives <tt>b,c,d</tt>, etc. |
46 | <p> |
46 | <p> |
47 | Two-dimensional array addressing is also available: if |
47 | Two-dimensional array addressing is also available: if |
48 | < |
48 | <pre>$$M=x,y,z;a,b,c</pre> |
49 | </center> <p> |
- | |
50 | (a 2x3 matrix), then |
49 | (a 2x3 matrix), then |
51 | <p><center> |
- | |
52 | < |
50 | <pre>$$(M[1;3,2])=z,y</pre> |
53 | |
51 | <li>If the character $emph$$$emphend is followed by the left bracket |
54 | $emph[$emphend, the matching $emph]$emphend will be located, the content |
52 | $emph[$emphend, the matching $emph]$emphend will be located, the content |
55 | of the pair of brackets substituted then evaluated to a real number value whose |
53 | of the pair of brackets substituted then evaluated to a real number value whose |
56 | precision depends on the value of $emph print_precision$emphend. |
54 | precision depends on the value of $emph print_precision$emphend. |
57 | This value will replace the whole thing |
55 | This value will replace the whole thing |
58 | together with the leading $emph$$$emphend. <br> |
56 | together with the leading $emph$$$emphend. <br> |