home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / fortran / 4428 < prev    next >
Encoding:
Text File  |  1992-11-23  |  2.1 KB  |  48 lines

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