Microsoft KB Archive/37900: Difference between revisions
m (Text replacement - "<" to "<") |
m (Text replacement - ">" to ">") |
||
Line 36: | Line 36: | ||
<div class="errormessage"> | <div class="errormessage"> | ||
No line number in module <name | No line number in module <name> at address: <address:offset><br /> | ||
Hit any key to return to system | Hit any key to return to system | ||
Line 52: | Line 52: | ||
<br /> | <br /> | ||
The following is a code example: | The following is a code example: | ||
<pre class="codesample">'<====== Main Module ====== | <pre class="codesample">'<====== Main Module ======> | ||
DECLARE SUB testsub () | DECLARE SUB testsub () | ||
CALL testsub | CALL testsub | ||
END | END | ||
'<====== SUB Module, Separately compiled ====== | '<====== SUB Module, Separately compiled ======> | ||
ErrTrap: | ErrTrap: | ||
PRINT " Error : ", ERR, " trapped in SUB module" | PRINT " Error : ", ERR, " trapped in SUB module" |
Latest revision as of 10:19, 21 July 2020
Article ID: 37900
Article Last Modified on 11/21/2006
This article was previously published under Q37900
SUMMARY
When developing large programs in QuickBasic that require multiple modules, do not LINK with the /PACKCODE option. This can stop the program with the following run-time error on a RESUME NEXT statement (when ON ERROR GOTO is used):
Linking with /PACKCODE may not produce any run-time errors in a single-module program.
This information applies to Microsoft QuickBasic Versions 4.00, 4.00b, and 4.50, and the Microsoft Basic Compiler Versions 6.00 and 6.00b for MS-DOS and MS OS/2.
MORE INFORMATION
For more information about the /PACKCODE switch, please see the section on "Linking object files with LINK" in the "Microsoft CodeView and Utilities" manual provided with the Basic Compiler Versions 6.00 and 6.00b (or with the Microsoft Macro Assembler Versions 5.x).
The following is a code example:
'<====== Main Module ======> DECLARE SUB testsub () CALL testsub END '<====== SUB Module, Separately compiled ======> ErrTrap: PRINT " Error : ", ERR, " trapped in SUB module" PRINT RESUME NEXT END SUB testsub STATIC ON ERROR GOTO ErrTrap ERROR 61 PRINT "Returned from error routine" END SUB
Additional query words: QuickBas BasicCom
Keywords: KB37900