CONST "Syntax Error" with BC.EXE 4.00, but Works in Editor (26009)






This article was previously published under Q26009

SUMMARY

The following line of code compiles properly inside the QB.EXE Version 4.00, 4.00b, or 4.50 editor, but BC.EXE issues a "Syntax error" at the last parenthesis at compile time, as follows:
   CONST True% = (0=0)
				
QB.EXE Version 3.00 issues an "illegal constant" error message when this code is either run from memory or compiled.

To work around this problem, use -1 or any other nonzero value to represent a logical TRUE, as follows:
   CONST True% = -1
   CONST False% = 0
				
Microsoft is researching this problem and will post new information as it becomes available.

Modification Type: Minor Last Reviewed: 1/9/2003
Keywords: KB26009