3 This is a sequence of statements, of which expression statements
4 are the commonest case. Statements are separated with semicolons,
5 and the newline character generally ends the sequence. If any
6 statement is an expression by itself, or is associated with an
7 'if' statement which is true, then two special things can happen.
8 If the sequence is executed at the top level of the calculator,
9 then the value of '.' is set to the value of the last expression.
10 Also, if an expression is a non-assignment, then the value of the
11 expression is automatically printed if its value is not NULL.
12 Some operations such as pre-increment and plus-equals are also
13 treated as assignments.
15 Examples of this are the following:
17 expression sets '.' to prints
18 ---------- ----------- ------
20 2*4; 8+1; fact(3) 6 8, 9, and 6
22 if (3 < 2) 5; else 6 6 6
27 Variables can be defined at the beginning of an expression sequence.
28 This is most useful for local variables, as in the following example,
29 which sums the square roots of the first few numbers:
31 local s, i; s = 0; for (i = 0; i < 10; i++) s += sqrt(i); s
33 If a return statement is executed in an expression sequence, then
34 the result of the expression sequence is the returned value. In
35 this case, '.' is set to the value, but nothing is printed.