Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!mcvax!enea!sommar From: sommar@enea.UUCP (Erland Sommarskog) Newsgroups: net.lang Subject: Re: null statements Message-ID: <1411@enea.UUCP> Date: Wed, 30-Jul-86 15:24:55 EDT Article-I.D.: enea.1411 Posted: Wed Jul 30 15:24:55 1986 Date-Received: Fri, 1-Aug-86 07:51:53 EDT References: <484@valid.UUCP> <3188@utcsri.UUCP> Reply-To: sommar@enea.UUCP (Erland Sommarskog) Distribution: net Organization: Enea Data, Sweden Lines: 19 Summary: IF THEN ELSE statement is valid In article <3188@utcsri.UUCP> greg@utcsri.UUCP (Gregory Smith) writes: >Isn't there a null statement ""? I.e., can't you say > > IF .... THEN ELSE BEGIN ... END > >??? ( i.e. just delete the ; on line 3. Sorry, can't find a reference ). IF THEN ELSE is legal Pascal. Look e.g. in Wirth's report only book of Pascal that contains the syntax graphs. You can express it that in Pascal the empty statement is written with an empty string. >PS: a Pascal teaching compiler I once used could come up with the >message 'semicolon is never legal before ELSE'. Neat, huh? So does DEC's Pascal compiler for VMS: "; ELSE is not valid Pascal" But most compilers says ELSE ^6 And at the end of list explains: "Illegal symbol". It takes some until you react normally and directly start to look for an illegal semicolon.