Single-Line IF...THEN Label, "Syntax Error"; Requires GOTO (59758)
The information in this article applies to:
- Microsoft QuickBASIC 2.0, when used with:
- the operating system: MS-DOS
- Microsoft QuickBASIC 2.01, when used with:
- the operating system: MS-DOS
- Microsoft QuickBASIC 3.0, when used with:
- the operating system: MS-DOS
- Microsoft QuickBASIC 4.0, when used with:
- the operating system: MS-DOS
- Microsoft QuickBASIC 4.0b, when used with:
- the operating system: MS-DOS
- Microsoft QuickBASIC 4.5, when used with:
- the operating system: MS-DOS
- Microsoft BASIC Compiler for MS-DOS and OS/2 6.0
- Microsoft BASIC Compiler for MS-DOS and OS/2 6.0b
- Microsoft Basic Professional Development System (PDS) for MS-DOS and MS OS/2 7.0
This article was previously published under Q59758 SUMMARY
A single-line IF statement of the form IF <cond> THEN <label> causes a
"Syntax Error." In a single-line IF statement, you must use the GOTO
statement to branch to a line label. This is different from the
branching rule for line numbers, where the GOTO is optional.
This information applies to Microsoft QuickBASIC Versions 2.00, 2.01,
3.00, 4.00, 4.00b, and 4.50 for MS-DOS, to Microsoft BASIC Compiler
Versions 6.00 and 6.00b for MS-DOS and OS/2, and to Microsoft BASIC
Professional Development System (PDS) Version 7.00 for MS-DOS and MS
OS/2.
Modification Type: | Minor | Last Reviewed: | 1/8/2003 |
---|
Keywords: | KB59758 |
---|
|