Q26009: CONST "Syntax Error" with BC.EXE 4.00, but Works in Editor
Article: Q26009 Product(s): See article Version(s): 3.00 4.00 4.00b 4.50 Operating System(s): MS-DOS Keyword(s): ENDUSER | | mspl13_basic Last Modified: 25-APR-1989 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.
THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.
Copyright Microsoft Corporation 1986-2002.