home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.fortran
- Path: sparky!uunet!usc!sol.ctr.columbia.edu!hamblin.math.byu.edu!hellgate.utah.edu!lanl!cochiti.lanl.gov!jlg
- From: jlg@cochiti.lanl.gov (J. Giles)
- Subject: Re: ENTRY in main (was re: Jumping from nested subroutine to main directly)
- Message-ID: <1992Nov23.194132.21678@newshost.lanl.gov>
- Sender: news@newshost.lanl.gov
- Organization: Los Alamos National Laboratory
- References: <By4xpo.FG@iapa.uucp%mailhost.ecn.uoknor.edu> <lh0rnpINN5ul@exodus.Eng.Sun.COM>
- Date: Mon, 23 Nov 1992 19:41:32 GMT
- Lines: 36
-
- In article <lh0rnpINN5ul@exodus.Eng.Sun.COM>, corbett@lupa.Eng.Sun.COM (Robert Corbett) writes:
- |> [...]
- |> Interestingly, the FORTRAN standard does not contain language
- |> prohibiting the main program from being called recursively.
- |> Since it does not permit calling the main program at all from
- |> within a running program, perhaps such a restriction was felt
- |> to be superfluous.
- |>
- |> In any case, a main program cannot contain an ENTRY statement.
- |> Section 14.2 of X3.9-1978 states
- |>
- |> A main program may contain any other statement except a
- |> BLOCK DATA, FUNCTION, SUBROUTINE, ENTRY, or RETURN
- |> statement.
-
- Actually, by excluding those statements, the standard implicitly
- denied the possibility of calling the main program. You can't
- all any Fortran procedure which is neither a FUNCTION, a SUBROUTINE,
- nor an ENTRY into one of those two. Main programs comntain no globally
- visible names which can be called! I know, most implementations make
- the name given on the PROGRAM statement a global - but that's not
- required or necessary. In any case, a standard conforming code
- cannot CALL it - because it's not on the list of things which
- can be CALLed.
-
- With respect to the original topic: the committee argued for
- ages over some sort of exception handling mechanism for what
- became Fortran 90 with no proposal meeting the approval of
- anywhere *near* a majority. Even the concept fell to an
- austerity move before the first public review cycle. At the
- time, I didn't even object to its absence - mainly because
- I couldn't think of a proposal which could be approved by
- such a varied crowd of committee members either.
-
- --
- J. Giles
-