Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!lll-winken!uunet!munnari.oz.au!brolga!bunyip.cc.uq.oz.au!oat!qut.edu.au!fisher From: fisher@qut.edu.au Newsgroups: comp.lang.fortran Subject: Re: Is this kosher? Message-ID: <1991Jan31.103435.23238@qut.edu.au> Date: 31 Jan 91 15:34:35 GMT References: <2787@dftsrv.gsfc.nasa.gov> Organization: Queensland University of Technology Lines: 36 In article <2787@dftsrv.gsfc.nasa.gov>, jim@jagubox.gsfc.nasa.gov (Jim Jagielski) writes: > > Tell me, is jumping into an IF block statement legal (I know it ain't > pretty)... for example: > . > . > Is the above legal and acceptable... I can't find any references to it in my > books... > I assume we are talking about FORTRAN 77. COMMENCE HOBBY HORSE As recently discussed there is only one authoritative book and it should be consulted by anyone answering this sort of question. It is ANSI X3.9-1978 and is easily obtained from the American National Standards Institute or your national Standards Organisation. END HOBBY HORSE 11.6.2 defines an IF-Block 11.6.3 paragraph 2 says "Transfer of control into an IF-block from outside the IF-block is prohibited." 11.7 and 11.8 include equivalent statements for ELSE IF-blocks and ELSE blocks. I cannot talk for the writers of ANSI X3.9-1978 but it is not hard to imagine that this prohibition simplifies the task of the writers of optimising compiler writers. Bill