Message from discussion Fortran Coding Style for the Modern Programmer
Subject: Re: Fortran Coding Style for the Modern Programmer
organization: University of Hawaii
Glen Reesor writes:
For someone being facetious, I'm puzzled by the inclusion of:
> Fortran Coding Style for the Modern Programmer
> 3. WRITE ALL CODE IN UPPERCASE IT LOOKS BETTER THAT WAY.
At least under FORTRAN 77 and earlier, uppercase was required for a
standard-conforming program. It has nothing to do with looking better.
I certainly wouldn't blame the previous programmer if I had to maintain
FORTRAN 77 code that was written in uppercase.
The following fall into the sometimes yes, sometimes no category:
> 1. When picking variable names, pick something meaningful then remove all
> the vowels. If the result is longer than 6 characters, truncate as
Are you advocating picking something unmeaningful? Or are you suggesting
that there is something wrong with using HMWRK as a variable name for a
homework score, for example, especially when it needs to be distinguished
from an exam score? (Please don't respond by saying "use a spreadsheet".)
On the other hand, there is no need to name an exam score variable XM.
> 2. When making code changes, don't delete lines--just comment them out.
> (You might need them later.)
For testing purposes, it's faster than copying the code to a file, if the
number of lines to be commented out is sufficiently small. For production
code, there is probably little reason to leave it in.