home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / fortran / 2803 < prev    next >
Encoding:
Text File  |  1992-07-22  |  2.2 KB  |  61 lines

  1. Newsgroups: comp.lang.fortran
  2. Path: sparky!uunet!stanford.edu!ames!nsisrv!pong!gary
  3. From: gary@pongnasa.gov (Gary Kenneth Krueger)
  4. Subject: Re: Using ! to denote a comment
  5. Message-ID: <1992Jul22.204454.20828@nsisrv.gsfc.nasa.gov>
  6. Sender: gary@pong (Gary Kenneth Krueger)
  7. Nntp-Posting-Host: pong.gsfc.nasa.gov
  8. Reply-To: gary@pong.gsfc.nasa.gov
  9. Organization: General Sciences Corporation @ Goddard Space Flight Center
  10. References: <21JUL199214442858@summa.tamu.edu> <BURLEY.92Jul21174207@geech.gnu.ai.mit.edu> <1992Jul22.151302.28373@colorado.edu>
  11. Date: Wed, 22 Jul 1992 20:44:54 GMT
  12. Lines: 47
  13.  
  14. In article <1992Jul22.151302.28373@colorado.edu>, ejh@khonshu.colorado.edu (Edward J. Hartnett) writes:
  15. > From: ejh@khonshu.colorado.edu (Edward J. Hartnett)
  16. > Subject: Re: Using ! to denote a comment
  17. > In article <BURLEY.92Jul21174207@geech.gnu.ai.mit.edu> burley@geech.gnu.ai.mit.edu (Craig Burley) writes:
  18. > >In article <21JUL199214442858@summa.tamu.edu> elo9246@summa.tamu.edu (LaNelle Ohlhausen) writes:
  19. > >
  20. > >   I have seen ! used in a program line in VAX fortran to denote that
  21. > >   everything following the ! is a comment, e.g.:
  22. > >
  23. > >       x=x+1    ! This is a comment
  24. > >
  25. > >   Is this standard Fortran 77 or is it a VAX extension only?
  26. > >
  27. > >It is not standard.  It is a VAX extension, among other vendors.  Seems
  28. > >pretty popular, from what I've been able to tell.
  29. > >
  30. > It's also used in the Sun FORTRAN compilers, and the Convex Fortran compilers.
  31. >             Ed Hartnett
  32.  
  33.     Hello,
  34.  
  35.     I typically use the following construction to avoid compatibility problems:
  36.  
  37.       x=x+1
  38. *          { This is a comment. }
  39.  
  40.     OR
  41.  
  42.       x=x+1
  43. C          { This is a comment. }
  44.  
  45.     Indenting the comment by about five spaces more than the statement allows you to indicate that it
  46. is associated with the statement, while not cluttering the beginning columns, which typically contain more
  47. major comments.
  48.  
  49.     Although, I would prefer the F90 standard to be more widely available, so that we might just go ahead
  50. and use the exclamation point comment.
  51.  
  52. -- 
  53. Gary Kenneth Krueger         )))) | Internet: gary@pong.gsfc.nasa.gov
  54. General Sciences Corporation   ,, |
  55. NASA/GSFC 974                   7 | voice: (301) 286-3133
  56. Greenbelt, MD 20771           \_  |
  57.