Next: Actual parameters
Up: Avoiding conflicts in the parser
Previous: The return statement
For function returning an arithmetic or a boolean expression like
equal?(x: %, y: %): Boolean == (x.n) = (y.n);
it may be useful to add the rule
Statement |
 |
RightValue |
where
RightValue is now defined by
RightValue |
 |
FunctionCall |
RightValue |
 |
ArithmeticExpression |
RightValue |
 |
BooleanExpression |
You may also refuse the above function definition and prefer
equal?(x: %, y: %): Boolean == return ((x.n) = (y.n));
as in JAVA.
Next: Actual parameters
Up: Avoiding conflicts in the parser
Previous: The return statement
Marc Moreno Maza
2004-12-01