Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!samsung!umich!sharkey!bnlux0!kushmer From: kushmer@bnlux0.bnl.gov (christopher kushmerick) Newsgroups: comp.lang.pascal Subject: Re: Gotos are ok (Was Re: IMPLEMENT GOTO ACROSS MODULES IN TURBO PASCAL??) Message-ID: <2427@bnlux0.bnl.gov> Date: 22 Jan 91 12:17:01 GMT References: <1991Jan10.122222.1013@uwasa.fi> <1991Jan16.005523.28337@syacus.acus.oz> <7612@plains.NoDak.edu> <2802@oucsace.cs.OHIOU.EDU> <1991Jan21.134342@cs.utwente.nl> Organization: Brookhave National Lab, Upton, NY Lines: 30 In article <1991Jan21.134342@cs.utwente.nl> devisser@cs.utwente.nl (Jan de Visser) writes: >In article <2802@oucsace.cs.OHIOU.EDU>, tswingle@oucsace.cs.OHIOU.EDU >(Tom Swingle) writes: >|> leave. Here's a skeleton of the procedure: >How about: placing your 'exit-code' in a 'local' procedure, called, say, >ExitProc, and >use the following code in case of an error: > > IF THEN BEGIN ExitProc; Exit END; > >No gotos! Except for the fact that an exit is just a fancy way of spelling goto, with the effective label being a automatic label right before the ultimate end. (I do not know if this is how it is actualy implemented, it may be a return, but from a logical viewpoint, this is what it is.) I like to use gotos within programming blocks, but not between programming blocks, by programming block, I mean a begin-end pair. I also do like the exit construct mentioned above, but I understand that it is a goto. Now: goto work :-) -- Chris Kushmerick kciremhsuK sirhC kushmer@bnlux0.bnl.gov <===Try this one first kushmerick@pofvax.sunysb.edu