Re: RFC - VBS Grammar

Arargh! <Arargh@Enteract.com>
4 Jan 2001 00:59:43 -0500

          From comp.compilers

Related articles
RFC - VBS Grammar larlew@home.com (Larry Lewis) (2000-12-23)
Re: RFC - VBS Grammar joachim_d@gmx.de (Joachim Durchholz) (2000-12-31)
Re: RFC - VBS Grammar snicol@apk.net (Scott Nicol) (2000-12-31)
Re: RFC - VBS Grammar snicol@apk.net (Scott Nicol) (2001-01-04)
Re: RFC - VBS Grammar Arargh@Enteract.com (Arargh!) (2001-01-04)
| List of all articles for this month |

From: Arargh! <Arargh@Enteract.com>
Newsgroups: comp.compilers
Date: 4 Jan 2001 00:59:43 -0500
Organization: Arargh!!
References: 00-12-104 00-12-118
Keywords: Basic, parse
Posted-Date: 04 Jan 2001 00:59:42 EST

On 31 Dec 2000 03:01:25 -0500, "Joachim Durchholz" <joachim_d@gmx.de>
wrote:


<snip>
>2. IF statement
>QuickBasic had a THEN-less form of IF, ? la
> IF expression statement [ELSE statement]
I think that this should be:


    IF expression THEN statement [ELSE statement] <end of line>


All the versions of QuickBASIC that I know of, require the THEN.


Here is the Syntax from PDS 7.1:
  ===
Single-line IF...THEN...ELSE Syntax
    IF condition THEN thenpart [ELSE elsepart]


Block IF...THEN...ELSE Syntax
    IF condition1 THEN
          [statementblock-1]
    [ELSEIF condition2 THEN
          [statementblock-2]] ...
    [ELSE
          [statementblock-n]]
    END IF
  ===
This is one of the several places where line ends MUST be noted when
scanning basic source.


  --
Arargh (at enteract dot com) http://www.arargh.com


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.