User Tools

Site Tools


cascaded_20on_20close_20handling

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
cascaded_20on_20close_20handling [2018/04/14 20:39]
richardrussell Added syntax highlighting
cascaded_20on_20close_20handling [2018/08/01 14:56] (current)
richardrussell Modified for compatibility with 64-bit BBC BASIC
Line 41: Line 41:
  
         DEF PROCclose         DEF PROCclose
-        IF !392 PROC(^@%+392) ELSE QUIT+        ​LOCAL c%% 
 +        c%% = PAGE - !340 + !392 
 +        ​IF !392 PROC(^c%%) ELSE QUIT
         ENDPROC         ENDPROC
 </​code>​ </​code>​
  
 Note that in a real-world example the final ON CLOSE handler would probably **QUIT** the program. That isn't done here because the displayed output would disappear!\\ \\  There is a theoretical possibility that an ON CLOSE event could occur //between// the **ON CLOSE** and **ON ERROR** statements in PROC0. In that very unlikely circumstance,​ the close would be handled as an error. Apart from the user receiving an unexpected message, it should be harmless. Note that in a real-world example the final ON CLOSE handler would probably **QUIT** the program. That isn't done here because the displayed output would disappear!\\ \\  There is a theoretical possibility that an ON CLOSE event could occur //between// the **ON CLOSE** and **ON ERROR** statements in PROC0. In that very unlikely circumstance,​ the close would be handled as an error. Apart from the user receiving an unexpected message, it should be harmless.
cascaded_20on_20close_20handling.txt · Last modified: 2018/08/01 14:56 by richardrussell