Path: utzoo!utgpu!attcan!uunet!peregrine!elroy!ames!ncar!tank!uxc!uxc.cso.uiuc.edu!uxg.cso.uiuc.edu!uxe.cso.uiuc.edu!hirchert From: hirchert@uxe.cso.uiuc.edu Newsgroups: comp.lang.fortran Subject: Re: Are GOTOs restricted in Fortran 88 Message-ID: <50500088@uxe.cso.uiuc.edu> Date: 1 Nov 88 18:38:00 GMT References: <4213@pitt.UUCP> Lines: 24 Nf-ID: #R:pitt.UUCP:4213:uxe.cso.uiuc.edu:50500088:000:1201 Nf-From: uxe.cso.uiuc.edu!hirchert Nov 1 12:38:00 1988 Debbie Whitfield(whit@pitt.UUCP) asks >/* ---------- "Are GOTOs restricted in Fortran 88" ---------- */ > I would like to know if the standard permits GOTOs to jump into >control structures; loops, if-then-elses, or procedures. > >Thanks in advance for your information. . FORTRAN 77 prohibited jumps into DO-loops. This restriction was retained in Fortran 8x and extended to apply to the new forms of DO loops as well. . FORTRAN 77 prohibited jumps into block-IF constructs from outside the construct with the "exception" that a branch to the END IF statement is permitted (and, in effect, equivalent to branching to a CONTINUE statement following the END IF statement). Fortran 8x has the same rules for block-IF, but flags the "exception" as obsolescent, so it might be removed in Fortran 9x. Fortran 8x also prohibits jumps into its other block constructs in in general. . Both FORTRAN 77 and Fortran 8x prohibit jumps into or out of a procedure. (In Fortran 8x, this applies to internal procedures and module procedures as well as the external procedures of FORTRAN 77.) Kurt W. Hirchert hirchert@ncsa.uiuc.edu National Center for Supercomputing Applications