Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Fortran Coding Style for the Modern Programmer

From: tho...@galileo.ifa.hawaii.edu
Subject: Re: Fortran Coding Style for the Modern Programmer
Date: 1995/12/05
Message-ID: <DJ3x8C.6M6@news.hawaii.edu>#1/1
X-Deja-AN: 121029645
sender: n...@news.hawaii.edu
x-nntp-posting-host: charon.ifa.hawaii.edu
references: <DIx7uv.Jn2@cu23.crl.aecl.ca>
organization: University of Hawaii
newsgroups: comp.lang.fortran

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 
>    required.

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.