Path: utzoo!attcan!uunet!mcvax!ukc!cam-cl!nmm From: nmm@cl.cam.ac.uk (Nick Maclaren) Newsgroups: comp.lang.fortran Subject: Re: Assigned GOTO Message-ID: <237@gannet.cl.cam.ac.uk> Date: 4 Jul 88 12:12:53 GMT References: <2742@utastro.UUCP> <20008@beta.UUCP> <224@raunvis.UUCP> <1544@microsoft.UUCP> <12215@mimsy.UUCP> Sender: news@cl.cam.ac.uk Reply-To: nmm@cl.cam.ac.uk (Nick Maclaren) Organization: U of Cambridge Comp Lab, UK Lines: 20 In article 766, chris@mimsy.UUCP (Chris Torek) writes: > I am confident that I could convert any assigned GOTO FORTRAN code into > something more reasonable, but I am curious: what do people actually > use it for? ... In general, I agree, but there are a few algorithms where assigned GOTOs clarify the code (sic). The ones I have written were all simple finite state algorithms (e.g. contour plotting), where the next state to go to was a function of the previous state. That is, state n+1 is decided by state n-1, rather than state n. The 'structured' approach is a case statement inside an infinite loop; I find this rather less clear. Still, I would not preserve assigned GOTOs for the sake of a few unusual algorithms, and no longer use them myself (even in Fortran). Nick Maclaren University of Cambridge Computer Laboratory nmm@uk.ac.cam.cl