Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!lll-winken!sun-barr!newstop!exodus!exodus-bb!khb From: khb@chiba.Eng.Sun.COM (chiba) Newsgroups: comp.lang.fortran Subject: Re: Is this kosher? Message-ID: Date: 30 Jan 91 18:43:17 GMT References: <2787@dftsrv.gsfc.nasa.gov> Sender: news@exodus.Eng.Sun.COM Organization: Sun MegaSystems Lines: 44 In-reply-to: jim@jagubox.gsfc.nasa.gov's message of 29 Jan 91 19:23:24 GMT 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: program tester . . . if (value .lt. 0) then . . . else 22 do something . . end if . . . if (a.lt.b) goto 22 Is the above legal and acceptable... I can't find any references to it in my books... ... discussion of why it's nice to be structured removed... because The question was IS IT LEGAL? The Answer is NO!@!!!!! Page 11-4 (of X3.9-1978) line 25 Transfer of control into an IF block from outside the IF block is prohibited. -- ---------------------------------------------------------------- Keith H. Bierman kbierman@Eng.Sun.COM | khb@chiba.Eng.Sun.COM SMI 2550 Garcia 12-33 | (415 336 2648) Mountain View, CA 94043