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

  1. Newsgroups: comp.lang.fortran
  2. Path: sparky!uunet!cs.utexas.edu!convex!constellation!iapa!ctrbdo
  3. From: ctrbdo@iapa.uucp%mailhost.ecn.uoknor.edu (bryan d oakley)
  4. Subject: ENTRY in main
  5. Message-ID: <By6qpv.pu@iapa.uucp%mailhost.ecn.uoknor.edu>
  6. Organization: FAA / Mike Monroney Aeronautical Center
  7. Date: Mon, 23 Nov 1992 20:10:41 GMT
  8. Lines: 30
  9.  
  10. Robert Corbett writes:
  11.  
  12. > In any case, a main program cannot contain an ENTRY statement.
  13. > Section 14.2 of X3.9-1978 states
  14. >     A main program may contain any other statement except a
  15. >     BLOCK DATA, FUNCTION, SUBROUTINE, ENTRY, or RETURN
  16. >     statement.
  17.  
  18. right you are!  Further, Section 15.7 (ENTRY statement) states 
  19.  
  20.     ... [an ENTRY statement] may appear anywhere within a function
  21.     subprogram after the FUNCTION statement or within a subroutine
  22.     subprogram after the SUBROUTINE statement, ...
  23.  
  24. ... but says nothing about allowing one in a main program. 
  25.  
  26. I should'a looked in the standard in the first place.  I looked in my
  27. favorite hardware vendor's FORTRAN reference and didn't see the
  28. exclusion.  Big suprise ... :-) Sure enough, the Sun compiler
  29. complains about a 'misplaced entry statement'.  Too lazy to see what
  30. my DG compiler does.  ... Just goes to show -- you can always learn
  31. something new about FORTRAN.
  32.  
  33.  
  34. -- 
  35. ----------------------------------------------------------------------
  36. Instrument Approach Procedures Automation              DOT/FAA/AMI-230
  37. ----------------------------------------------------------------------
  38. Bryan D. Oakley                    ctrbdo%iapa@mailhost.ecn.uoknor.edu
  39.