Microsoft KB Archive/21862

= Duplicate Labels Can Only Be Separately Compiled s =

Article ID: 21862

Article Last Modified on 11/21/2006

-

APPLIES TO


 * Microsoft QuickBasic 2.01

-



This article was previously published under Q21862



SUMMARY
Question:

Can I use the same line numbers or line labels in different subprograms that are compiled in the same source file?

Response:

No, but you can use the same line numbers or line labels if the subprograms are separately compiled.

Line numbers and labels are local to the compiled module in which they occur. Line numbers and labels must be unique within a given compiled module. You do not need to worry about duplicate labels in separately compiled modules.

Note that using the REM $INCLUDE metacommand to include source code from a separate file is similar to putting the two sources into one file. Any files included at compile time with the REM $INCLUDE metacommand are considered as part of that module, and are included in the .OBJ file.

This information needs to be added to Section 9.2.1, "Using Line Labels", on Page 160 of the "Microsoft QuickBasic Compiler" manual for Versions 2.00, 2.01, and 3.00.

Additional query words: QuickBas

Keywords: KB21862

-

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

© Microsoft Corporation. All rights reserved.