CONST, DATA Cannot Precede COMMON Statement (27254)
The information in this article applies to:
- Microsoft QuickBASIC 4.0, when used with:
- the operating system: MS-DOS
- Microsoft QuickBASIC 4.0b, when used with:
- the operating system: MS-DOS
- Microsoft QuickBASIC 4.5, when used with:
- the operating system: MS-DOS
- 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 Q27254 SUMMARY
BC.EXE correctly gives the error message "COMMON and DECLARE must
precede executable statements" if DATA and CONST statements are placed
before COMMON statements. However, the QB.EXE or QBX.EXE environment
fails to give this error in the same situation, and actually runs the
program. Despite this behavior of QB.EXE and QBX.EXE, DATA and CONST
statements should only be placed after COMMON statements in your
source code.
This information applies to Microsoft QuickBasic versions 4.00, 4.00b,
and 4.50 for MS-DOS; to Microsoft Basic Compiler versions 6.00 and
6.00b for MS-DOS and MS OS/2; and to Microsoft Basic Professional
Development System (PDS) versions 7.00 and 7.10 for MS-DOS and MS
OS/2.
Modification Type: | Minor | Last Reviewed: | 1/8/2003 |
---|
Keywords: | KB27254 |
---|
|