Abrupt Branch to ON Event GOSUB Handler from Separate Handler (64430)
The information in this article applies to:
- Microsoft QuickBASIC 4.0
- Microsoft QuickBASIC 4.0b
- Microsoft QuickBASIC 4.5
- Microsoft BASIC Compiler for MS-DOS and OS/2 6.0
- Microsoft BASIC Compiler for MS-DOS and OS/2 6.0b
- Microsoft Basic Professional Development System (PDS) for MS-DOS and MS OS/2 7.0
- Microsoft Basic Professional Development System (PDS) for MS-DOS and MS OS/2 7.1
This article was previously published under Q64430 SUMMARY
When program control is within an ON <event> GOSUB handler, it is
still possible to trap other events (where <event> can be COM, KEY,
PEN, PLAY, STRIG, TIMER, etc.). This is normal behavior for ON <event>
GOSUB trapping, but may be undesirable for those who want to disable
all event trapping within an ON <event> handler. This article gives a
code example demonstrating normal flow of control when a second
trappable key is pressed within a given ON KEY GOSUB handler. The
comments in this program show a method of temporarily disabling KEY
and other event trapping within an ON KEY GOSUB handler.
REFERENCES
For more description of normal program flow within an ON <event> GOSUB
handler, please see the following:
- Page 315 of "Microsoft Basic 7.0: Programmer's Guide" for Basic PDS
versions 7.00 and 7.10
- Page 234 of "Microsoft QuickBasic 4.5: Programming in Basic" manual
for QuickBasic version 4.50
- Page 289 of "Microsoft QuickBasic 4.0: Programming in Basic:
Selected Topics" manual for QuickBasic versions 4.00 and 4.00b
- Page 357 of "Microsoft QuickBasic Compiler" manual for versions
2.00, 2.01, and 3.00
Modification Type: | Minor | Last Reviewed: | 8/16/2005 |
---|
Keywords: | KB64430 |
---|
|