Newsgroups: comp.lang.pascal Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!snorkelwacker.mit.edu!bloom-picayune.mit.edu!athena.mit.edu!pshuang From: pshuang@athena.mit.edu (Ping-Shun Huang) Subject: Re: Function of semi-colon in Pascal (was: Pascal puzzle) In-Reply-To: cslaurie@cybaswan.UUCP's message of 27 Jun 91 19:53:48 GMT Message-ID: Sender: news@athena.mit.edu (News system) Organization: Massachusetts Institute of Technology References: <2580@cybaswan.UUCP> Date: Mon, 1 Jul 91 02:04:20 GMT Lines: 17 In article <2580@cybaswan.UUCP> cslaurie@cybaswan.UUCP (Laurie Moseley ) writes: > I expected that this piece of code would not compile. [....] > Anyway, I tried it out of curiosity, and sure enough it did not compile > (and it shouldn't). At least in Turbo Pascal, there is a provision for a CASE-ELSE statement, so the above code is acceptable on certain compilers. Peter, to get your code to do what you want: (a) remove the semicolon after "RequestExit"; (b) put in some way for the user to change the value of the variable "confirm". -- Above text where applicable is (c) Copyleft 1991, all rights deserved by: UNIX:/etc/ping instantiated (Ping Huang) [INTERNET: pshuang@athena.mit.edu]