PRB: "Variable <variable> is not found" Using #INCLUDE FilesLast reviewed: January 10, 1997Article ID: Q156672 |
The information in this article applies to:
SYMPTOMSIf a predefined constant is referenced in a class or form, the following error message may be displayed:
Variable "<variable>" is not found.. <Cancel> <Suspend> <Ignore> <Help> CAUSEThe header file of predefined compile-time constants has not been properly included in the class or form.
WORKAROUND
Method 1Include the header file in class or form using the following steps:
Method 2Insert the #INCLUDE in the application menu's general options, in the menu setup snippet.
Method 3In every event or method on the class or form that references the predefined constant, reissue the #INCLUDE "<filename>".
STATUSThis behavior is by design.
MORE INFORMATIONPredefined constants are defined by the #DEFINE directive. Generally, a series of #DEFINEs is included in a header file. In turn, this header file is referenced by a #INCLUDE in the class or form. This error usually occurs because the #INCLUDE is issued in the Load event of the class or form. By the time the event or method is called on the class or form that references the predefined constants, the constant is out of scope.
Steps to Reproduce Behavior
REFERENCESDeveloper's Guide, page 228. Visual FoxPro Help file: search on: "#INCLUDE preprocessor directive" and "#DEFINE ... #UNDEF preprocessor directive."
|
KBCategory: kbtool kbprb
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |