home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.fortran
- Path: sparky!uunet!stanford.edu!ames!nsisrv!pong!gary
- From: gary@pongnasa.gov (Gary Kenneth Krueger)
- Subject: Re: Using ! to denote a comment
- Message-ID: <1992Jul22.204454.20828@nsisrv.gsfc.nasa.gov>
- Sender: gary@pong (Gary Kenneth Krueger)
- Nntp-Posting-Host: pong.gsfc.nasa.gov
- Reply-To: gary@pong.gsfc.nasa.gov
- Organization: General Sciences Corporation @ Goddard Space Flight Center
- References: <21JUL199214442858@summa.tamu.edu> <BURLEY.92Jul21174207@geech.gnu.ai.mit.edu> <1992Jul22.151302.28373@colorado.edu>
- Date: Wed, 22 Jul 1992 20:44:54 GMT
- Lines: 47
-
- In article <1992Jul22.151302.28373@colorado.edu>, ejh@khonshu.colorado.edu (Edward J. Hartnett) writes:
- > From: ejh@khonshu.colorado.edu (Edward J. Hartnett)
- > Subject: Re: Using ! to denote a comment
- >
- > In article <BURLEY.92Jul21174207@geech.gnu.ai.mit.edu> burley@geech.gnu.ai.mit.edu (Craig Burley) writes:
- > >In article <21JUL199214442858@summa.tamu.edu> elo9246@summa.tamu.edu (LaNelle Ohlhausen) writes:
- > >
- > > I have seen ! used in a program line in VAX fortran to denote that
- > > everything following the ! is a comment, e.g.:
- > >
- > > x=x+1 ! This is a comment
- > >
- > > Is this standard Fortran 77 or is it a VAX extension only?
- > >
- > >It is not standard. It is a VAX extension, among other vendors. Seems
- > >pretty popular, from what I've been able to tell.
- > >
- >
- > It's also used in the Sun FORTRAN compilers, and the Convex Fortran compilers.
- > Ed Hartnett
- >
- >
-
- Hello,
-
- I typically use the following construction to avoid compatibility problems:
-
- x=x+1
- * { This is a comment. }
-
- OR
-
- x=x+1
- C { This is a comment. }
-
- Indenting the comment by about five spaces more than the statement allows you to indicate that it
- is associated with the statement, while not cluttering the beginning columns, which typically contain more
- major comments.
-
- Although, I would prefer the F90 standard to be more widely available, so that we might just go ahead
- and use the exclamation point comment.
-
- --
- Gary Kenneth Krueger )))) | Internet: gary@pong.gsfc.nasa.gov
- General Sciences Corporation ,, |
- NASA/GSFC 974 7 | voice: (301) 286-3133
- Greenbelt, MD 20771 \_ |
-