Microsoft KB Archive/37900

= Do Not LINK Multiple Modules with /PACKCODE =

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):

No line number in module at address: 

Hit any key to return to system

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 &quot;Linking object files with LINK&quot; in the &quot;Microsoft CodeView and Utilities&quot; 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 &quot; Error : &quot;, ERR, &quot; trapped in SUB module&quot; PRINT RESUME NEXT END SUB testsub STATIC ON ERROR GOTO ErrTrap ERROR 61 PRINT &quot;Returned from error routine&quot; END SUB

Additional query words: QuickBas BasicCom

Keywords: KB37900

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.