Re: Capitalization style



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.

.



Relevant Pages

  • Re: Capitalization style
    ... lowercase letters for all other identifiers. ... However, in "Fortran ... 95/2003 Explained" by Metcalf, Reid, and Cohen lowercase letters are ... leading me to believe there is no community consensus ...
    (comp.lang.fortran)
  • Re: Capitalization style
    ... Fortran bias, so I avoid things that look old-fashioned to non-Fortran ... Capitalizing things in a case-insensitive language can cause ... I'm wondering about the community standard, ... 95/2003 Explained" by Metcalf, Reid, and Cohen lowercase letters are ...
    (comp.lang.fortran)
  • Re: Capitalization style
    ... course in parallel programming and Fortran seems like a good language to ... I'm wondering about the community standard, ... 95/2003 Explained" by Metcalf, Reid, and Cohen lowercase letters are ... This leaves capitalization in the domain of personal style. ...
    (comp.lang.fortran)
  • Re: Capitalization style
    ... course in parallel programming and Fortran seems like a good language to ... regarding the use of capital letters in identifiers. ... 95/2003 Explained" by Metcalf, Reid, and Cohen lowercase letters are ... advantage to using uppercase for Fortran keywords. ...
    (comp.lang.fortran)
  • Re: A few syntax questions
    ... I think putting them in the 'action-stmt' syntax rule ... If I were to redo the bnf from scratch, ... I guess that means that a standard conforming compiler is supposed to overflow. ... I am hoping that F2003 features will regain some respect for Fortran in CS departments,, and not just be coinsidered an old archaic language for old programs, but such strong support of archaic Fortran standards is a major reason why Fortran popularity continues to dwindle. ...
    (comp.lang.fortran)