Handling Events and ERRORs When Basic Calls Non-Basic Routines (41390)
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 for MS-DOS 7.0
This article was previously published under Q41390 SUMMARY
This information applies to QuickBasic Versions 4.00, 4.00b, and 4.50,
Microsoft Basic Compiler Versions 6.00 and 6.00b for MS-DOS and OS/2,
and Microsoft Basic PDS Version 7.00 for MS-DOS and MS OS/2.
The following corrections for documentation errors apply to Page 296
of the learning and using Microsoft QuickBasic manual for QuickBasic
4.00 and 4.00b and Basic compiler 6.00 and 6.00b, and to Page 442-443
of the "Microsoft Basic Version 7.0: Programmer's Guide" for Basic PDS
7.00:
- The section "Events and Errors" incorrectly implies that Basic
can call a subroutine written in a different language, have that
language sense an EVENT or ERROR, and then jump to the error
handling routine in Basic. Basic is not designed to do this. What
happens is that the first event (but not subsequent events) that
occurs during the other language procedure is stored on the stack
until control returns to Basic. If the other language procedure
calls a Basic procedure in which the ERROR statement forces an
error (or a natural error occurs), then the error handler (if any)
in the Basic program handles the error and RESUMEs as described
below.
- The last sentence is incorrect ("The Basic statement containing...
is the statement that RESUME would reexecute"). This sentence should
be changed to say the following:
"The Basic statement containing the error (ERROR x%) is the
statement that RESUME would reexecute. RESUME NEXT would reexecute
at the following statement."
Modification Type: | Minor | Last Reviewed: | 8/16/2005 |
---|
Keywords: | KB41390 |
---|
|