![]() |
Section 6.7.5: |
A case statement first evaluates a guard value and compares this in turn with the constant guard for each clause until one is found which is equal. The corresponding code sequence is then executed. If no guard is found with equality testing then, if an else-clause is provided the corresponding code sequence is executed. If there is no else-clause then an exception is raised.
NOTE | Current implementations of Sather do not raise a catchable exception. This is an implementation error. The language definition indicates that all exceptions whether raised by explicit use of the raise statement or for any other reason are catchable unless the execution environment indicates otherwise! |
The val expression of each guard clause shall be of the form variable.is_eq(constant value). Note that it is a dynamic, rather than static, error if there is no else-clause - except when there are no when-clauses - when the else-clause absence becomes part of the well-formedness criteria.
TO BE DONE
TO BE DONE
![]() |
Specification Index | ![]() |
Language Index | ![]() |
Section 6 Index |
Comments
or enquiries should be made to Keith Hopper. Page last modified: Wednesday, 31 May 2000. |
![]() |