Re: Capitalization style
- From: helbig@xxxxxxxxxxxxxxxxxxxxxxxx (Phillip Helbig---remove CLOTHES to reply)
- Date: Sat, 27 Dec 2008 12:44:31 +0000 (UTC)
In article <495620ab$0$1553$4d3efbfe@xxxxxxxxxxxxxx>, "Peter C. Chapin"
<pcc482719@xxxxxxxxx> writes:
In the book "Fortran 90 Programming" by Ellis, Philips, and Lahey the
authors use UPPERCASE letters for Fortran keywords and intrinsics, and
lowercase letters for all other identifiers. However, in "Fortran
95/2003 Explained" by Metcalf, Reid, and Cohen lowercase letters are
used throughout.
In the postings on this newsgroup I've seen both approaches (and
probably others), leading me to believe there is no community consensus
on this point of style. Personally I find the mixed case approach
slightly more appealing, but I want to follow the community standard if
there is one... especially since I might be presenting Fortran code to
students.
There is no consensus.
Fortran77 was upper-case only for actual code. According to the
standard, lower-case was OK in strings and comments if the processor
supported this (in practice, all or almost all did). I think even
Fortran90 did not REQUIRE lower case to exist, but DID specify that, if
it existed, it could be used in code as if it were upper case. That is,
nothing is case-sensitive. (Of course, even in Fortran77 this was a
common extension.) Maybe a subsequent standard even requires that the
processor support lower case for code, I don't know.
My personal view is to use upper case for all code and mixed case (i.e.
normal writing style) for comments. Strings have lower case where
appropriate, of course.
This makes for a clear separation between code and comments. Also, it
is backward-compatible with standard Fortran77 code.
.
- Follow-Ups:
- Re: Capitalization style
- From: Paul van Delst
- Re: Capitalization style
- References:
- Capitalization style
- From: Peter C. Chapin
- Capitalization style
- Prev by Date: Capitalization style
- Next by Date: Is Co-Array the Future of Parallel Computing?
- Previous by thread: Capitalization style
- Next by thread: Re: Capitalization style
- Index(es):
Relevant Pages
|