Icon+Unicon/Intro: Difference between revisions
Content added Content deleted
Line 276: | Line 276: | ||
=== Signals and Exceptions === |
=== Signals and Exceptions === |
||
====stop(expr)==== |
====stop(expr)==== |
||
Terminates the current program and writes the result of expression to a file (&errout by default). |
|||
Terminate program with prejudice. |
|||
====error trapping==== |
====error trapping==== |
||
The keyword &error is normally zero, but if set to a positive value, this sets the number of fatal errors that are tolerated and converted to expression failure; the value of &error is decremented if this happens. Therefore the now-common TRY-CATCH behaviour can be written as: |
The keyword &error is normally zero, but if set to a positive value, this sets the number of fatal errors that are tolerated and converted to expression failure; the value of &error is decremented if this happens. Therefore the now-common TRY-CATCH behaviour can be written as: |