Now we can return to the topic of local variables.
S :: He Rwhere S is a source, R is a rest, and He is a so called "hard expression". The hard expression He, which consists of symbols, brackets, and variables, must satisfy the following restrictions:
First, He must not contain two occurrences of the same variable.
Second, each subexpression of He can contain no more than one ve-variable at the top level.
It can be easily seen that, being a hard expression, He can be regarded as a format expression, and the Refal Plus compiler verifies that S is certain to return ground expressions satisfying the format He.
The path S :: He R is evaluated as follows. First, the source S is evaluated. If the result returned is a ground expression Ge, the variables in He are bound to the corresponding subexpressions of Ge. Then the rest R is evaluated, and the result returned is taken to be the result of the whole construct.
100 :: sX, <Add sX 1> :: sX = sXreturns 101.
The hard expression He in a path S :: He R may be empty, in which case the path takes the form S :: R and can be abbreviated to S R.
This construct (called condition) is usually used in cases where we are interested in the side effects produced by evaluating S, rather than in the result returned by S.
<PrintLn "A">, <PrintLn "B">, <PrintLn "C"> =causes three lines to be printed, the first line consisting of the character A, the second of the character B, and the third of the character C.
The rest R in a path S :: He R may consist of a single comma, in which case the path takes the form S :: He , and can be abbreviated to S :: He .