Control Structures
These are examples of control structures. You may also be interested in:

 Conditional structures
 Exceptions
 Flow-control structures
 Loops

This task is to give an example of an exception handling routine
and to "throw" a new exception.



Related task

   Exceptions Through Nested Calls


 
Module Errors {
      Module Check {
            Module Error1 {
                  A=1/0
            }
 
            Try ok {
                  Error1
            }
            ' we get an Error, and Error$ print division by zero in module Error1
            If Error or not ok then Print Error$ 
            Error "New Error"
      }
      Try {
            Check
      }
      Print Error=0  ' no Error return
      Print Error$  ' but Error message isn't clear
      ' Error$ used one time, then cleared automatic
}
Errors
Print Error$=""
 