Exceptions: Difference between revisions
Content added Content deleted
m (change include to be prelude) |
|||
Line 92: | Line 92: | ||
FI |
FI |
||
</pre> |
</pre> |
||
===Standard |
===Standard Prelude "on event" routines=== |
||
ALGOL 68 uses event routines extensively in the "standard transput" |
ALGOL 68 uses event routines extensively in the "standard transput" |
||
(stdio) to manage the various events that arise when data is read |
(stdio) to manage the various events that arise when data is read |
||
Line 107: | Line 107: | ||
All of the above allow the programmer to define a user created event |
All of the above allow the programmer to define a user created event |
||
routine when a particular event happens to a particular FILE. When such an |
routine when a particular event happens to a particular FILE. When such an |
||
event routine is called, then the routine can use any of the standard |
event routine is called, then the routine can use any of the standard prelude |
||
routine to reposition the FILE and rectify the detected event, eg: |
routine to reposition the FILE and rectify the detected event, eg: |
||
* space or back space |
* space or back space |
||
Line 115: | Line 115: | ||
The handler is permitted to return TRUE depending on whether the event |
The handler is permitted to return TRUE depending on whether the event |
||
has been handled and the program can can continue. And FALSE is when event |
has been handled and the program can can continue. And FALSE is when event |
||
remains unhandled, and the standard |
remains unhandled, and the standard prelude event routine should be used. The |
||
handler is also permitted to exit to a label (without returning anything) if the |
handler is also permitted to exit to a label (without returning anything) if the |
||
user defined event routine determines that processing is complete. |
user defined event routine determines that processing is complete. |