Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!munnari.oz.au!metro!usage.csd.unsw.oz.au!syacus!ian From: ian@syacus.acus.oz (Ian Joyner) Newsgroups: comp.lang.pascal Subject: Re: Gotos are ok (Was Re: IMPLEMENT GOTO ACROSS MODULES IN TURBO PASCAL??) Message-ID: <1991Jan30.013852.25841@syacus.acus.oz> Date: 30 Jan 91 01:38:52 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> <2427@bnlux0.bnl.gov> Organization: ACUS Australian Centre for Unisys Software, Sydney Lines: 20 kushmer@bnlux0.bnl.gov (christopher kushmerick) writes: >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 think Chris makes the important point here, which perhaps underlines that it is not the gotos that are problematic, it is the labels. Every control structure in an HLL hides an implicit goto. Even sequential execution implies "goto next instruction", however no machine code is generated in this case. The point about return (or exit) is that it goes to one well defined place, you don't have to hunt the label down, which could be anywhere. This makes programs easier to follow, as the reader does not even have to think what the implications of the instruction is, as the jump is well defined and contained. -- Ian Joyner ACSNet: ian@syacus.oz ACUS (Australian Centre for Unisys Software) DNS: ian@syacus.oz.au Tel 61-2-390 1328 Fax 61-2-390 1391 UUCP: ...uunet!munnari!syacus.oz