1<page xmlns="http://projectmallard.org/1.0/"
2      type="guide"
3      id="variable">
4
5    <info>
6        <link type="guide" xref="index#equation"/>
7    </info>
8
9	<title>Variables</title>
10
11    <p>
12    To assign a value to a variable use the = symbol or choose the variable to assign to with the <gui>x</gui> button in <link xref="mouse">advanced mode</link>.
13    A variable name must only contain upper or lower characters.
14    </p>
15    <example>
16    <p>
17    x=5
18    </p>
19    <p>
20    value=82
21    </p>
22    </example>
23    <p>
24    Variables can be used in any equation and are substituted for their assigned value.
25    Variables can be inserted using the <gui>x</gui> button.
26    </p>
27    <example>
28    <p>
29    6x+3
30    </p>
31    <p>
32    xy−3x+7y−21
33    </p>
34    </example>
35    <p>
36    The following variables are always defined.
37    </p>
38    <table>
39    <tr>
40    <td><p>ans</p></td>
41    <td><p>Result of previous calculation</p></td>
42    </tr>
43    <tr>
44    <td><p>e</p></td>
45    <td><p><link xref="logarithm">Euler's Number</link></p></td>
46    </tr>
47    <tr>
48    <td><p>π</p></td>
49    <td><p><link xref="trigonometry">Pi</link></p></td>
50    </tr>
51    <tr>
52    <td><p>rand</p></td>
53    <td><p>Random value in the range [0,1] (changes on each read)</p></td>
54    </tr>
55    </table>
56</page>
57