The LOCAL forms of event trapping available in BBC BASIC for Windows version 5.00a and later (ON CLOSE LOCAL, ON MOUSE LOCAL, ON MOVE LOCAL, ON SYS LOCAL and ON TIME LOCAL) need special care. Because of the way events are queued it is possible that an event has occurred but has not yet been processed when the ON <event> LOCAL statement is executed. In that case the event may be processed by the previous ON <event> statement, if any. Similarly, a queued event may be processed by the ON <event> LOCAL statement even after the function or procedure in which it is contained has been exited. You should write your interrupt service routines to be tolerant of these possibilities. |
|