Microsoft KB Archive/99610

{| = FIX: &quot;Syntax Error&quot; in .SPR File with #SECTION Directive =
 * width="100%"|

ID: Q99610

2.50   | 2.50 WINDOWS | MS-DOS The information in this article applies to:


 * Microsoft FoxPro for MS-DOS, version 2.5
 * Microsoft FoxPro for Windows, version 2.5

SYMPTOMS
When you are using the #SECTION directive in the setup code of a screen, the resulting .SPR file will produce a &quot;Syntax Error&quot; message. The error occurs only if a semicolon is used to divide a line of code under the #SECTION 2 directive.

RESOLUTION
To 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 &quot;More Information&quot; section below:

#SECTION 2 PRIVATE ; var1, var2 PRIVATE ; var3

MORE INFORMATION
If 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, ; var4 When 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 fixlist2.50a KBCategory: KBSubcategory: FxtoolSbuilder

Keywords         : kberrmsg FxtoolSbuilder Version          : 2.50 | 2.50 Platform         : MS-DOS WINDOWS Solution Type    : kbfix
 * }