FIX: "Syntax Error" in .SPR File with #SECTION DirectiveLast reviewed: September 22, 1997Article ID: Q99610 |
2.50 | 2.50WINDOWS | MS-DOS kbprg kbfixlist kbbuglist kberrmsg The information in this article applies to:
SYMPTOMSWhen you are using the #SECTION directive in the setup code of a screen, the resulting .SPR file will produce a "Syntax Error" message. The error occurs only if a semicolon (;) is used to divide a line of code under the #SECTION 2 directive.
RESOLUTIONTo work around this problem, use one semicolon in the #SECTION 2 code. If the code requires more than one semicolon, you must use a new command. For example, the following change will correct the faulty code shown in the "More Information" section below:
#SECTION 2 PRIVATE ; var1, var2 PRIVATE ; var3 MORE INFORMATIONIf the following code is used in the setup code of a screen in the Screen Builder, an error will occur when you try to run the .SPR program:
#SECTION 1 PARAMETER ; var1, ; var2 #SECTION 2 PRIVATE ; var3, ; var4When this code is generated, the SECTION 2 code is placed in the SECTION 2 generated code area. In addition, the first two lines of this code are placed at the end of the SECTION 1 generated code. This is where the error occurs. Below is an example of the generated code:
#region 1 private ; var3, ;This code will cause an error because the semicolon at the end of the third line makes FoxPro assume that the next line is part of the third line of code.
|
Additional reference words: FoxWin FoxDos 2.50 errmsg err msg buglist2.50
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |