From: email@example.com ()
Subject: column 72
Date: 16 Jan 2001 07:31:23 GMT
Alan Miller wrote:
> I have only just written a piece of code to correct for
> another one of Sun's wretched Fortran extensions.
> Some (all?) Sun Fortran compilers allow fixed format
> code to extend beyond column 72. Columns 73-80 are
> allowed to hold sequence numbers in fixed form - there is
> still some code at netlib which uses them. Most compilers
> will just ignore columns beyond column 72 in my experience,
> and this often causes errors.
Only Sun's f77 compiler works as you describe, and only
when a horizontal tab appears in the first 6 columns of
a line. This "tab format" extension is common to most
UNIX f77 compilers.
Sun's f90/f95 compiler uses a different tab format
convention, which we inherited from the Craysoft compiler.
In free format, all characters, including tabs, are
treated as single characters. In fixed format, a tab
in the first six columns is treated as a skip to the
seventh column. A tab anywhere else is tried as a
single character. Characters that appear after
column 72 are ignored.
Note that Craysoft's tab convention is as likely to confuse
a user as UNIX f77's tab convention. When a source program
is viewed using an editor, pg, more, or less, the columns
don't match the columns as they are considered by the compiler.
Even if that problem were fixed for tabs, there would still be
problems with the other format effectors.