PRB: #DEFINE with Equal Sign Causes a Syntax ErrorLast reviewed: June 27, 1995Article ID: Q99603 |
The information in this article applies to:
SYMPTOMSIn a compiled program, a constant defined with the #DEFINE clause causes a "Syntax Error" message when the constant is used in subsequent code snippets.
CAUSEThe #DEFINE clause was incorrectly coded. An equal sign in the #DEFINE clause results in a "Syntax Error" message when the constant is used in subsequent code. For example, the following code will cause the error:
#DEFINE salestax = .10 sale = 123.45 * The following line produces a syntax error. invtotal = sale * (1 + salestax) RESOLUTIONRemove the equal sign (=) from the #DEFINE clause. Correct syntax for the #DEFINE clause is as follows:
#DEFINE salestax .10NOTE: #DEFINE is a preprocessor directive, not a screen generator directive. Therefore, it is not listed in the generator directive section of the "Developer's Guide" for version 2.5.
REFERENCES"Language Reference," version 2.5, Chapter 3
|
Additional reference words: FoxDos FoxWin 2.50 define # 2.50a
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |