Microsoft KB Archive/73652

= BC.EXE &quot;$metacommand error&quot; if $INCLUDE: ' ' > 40 =

Article ID: 73652

Article Last Modified on 11/21/2006

-

APPLIES TO


 * Microsoft QuickBasic 4.0
 * Microsoft QuickBASIC 4.0b
 * Microsoft QuickBasic 4.5 for MS-DOS
 * Microsoft BASIC Compiler 6.0
 * Microsoft BASIC Compiler 6.0b
 * Microsoft BASIC Professional Development System 7.0
 * Microsoft BASIC Professional Development System 7.1

-



This article was previously published under Q73652



SUMMARY
The BC.EXE compiler has a limitation of 40 characters for the filespec name in the metacommand $INCLUDE: ' '. If the filespec is greater than 40 characters, the BC.EXE compiler gives a &quot;$metacommand error&quot; warning, and the $INCLUDE file is not read.

This information applies to Microsoft QuickBasic versions 4.0, 4.0b, and 4.5 for MS-DOS; Microsoft Basic Compiler versions 6.0 and 6.0b for MS-DOS and MS OS/2; and Microsoft Basic Professional Development System (PDS) versions 7.0 and 7.1 for MS-DOS and MS OS/2.



MORE INFORMATION
The $INCLUDE statement has the following syntax: REM $INCLUDE: ' ' If the filespec exceeds 40 characters, the BC.EXE compiler will generate the error message &quot;$metacommand error&quot;. This error message can be suppressed with the /T compile option, which may result in other error messages, such as &quot;Type Mismatch&quot; or &quot;Type Not Defined&quot;. These errors are caused by the include file not being found. Also, any reference to TYPE...END TYPE and/or COMMON SHARED variables that are defined in the include file will not be found.

Note: The BC /T option was introduced in QuickBasic 4.0b and in Basic Compiler 6.0.

To work around the limitation, you can shorten the directory path name, and then set the &quot;INCLUDE=&quot; environment variable for MS-DOS to point to the directory of the include files, or copy the include files to a directory that is not as deeply nested.

Note that the QBX.EXE environment in Basic PDS does not have this limitation. QBX.EXE will find and read $INCLUDE files that are specified with a filespec greater than 40 characters.

Additional query words: QuickBas BasicCom 4.00 4.00b 4.50 6.00 6.00b 7.00 7.10

Keywords: KB73652

-

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

© Microsoft Corporation. All rights reserved.