This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
gfortran and f77 line continuation
- From: Ewan <e dot towie at elec dot gla dot ac dot uk>
- To: fortran at gcc dot gnu dot org
- Date: Tue, 28 Nov 2006 17:40:05 +0000
- Subject: gfortran and f77 line continuation
Hello there,
I am a new user to gfortran having previously used a variety of
commercial fortran compilers. I like what I have used so far but I am
having a terrible time in getting some old Fortran77 code to compile
properly.
The issue is that I am using a mixed code-base with both Fortran90-95
code and Fortran77 code. The 95 code compiles pretty much OK, once I
had discovered that you could disable the line length limit on the
free-source form. I occasionally do produce large pieces of code which
for ease-of-reading I allow to cross the 132 column limit normally defined.
My problem now is that I cannot get my Fortran77 code to compile
properly as the gfortran compiler seems to no longer accept the f77
method of line continuation. I have tried using the f90 mode of using
the ampersand, the f77 method of placing a character in column 6, or an
integer in column 7. Nothing seems to get the code to compile.
Code sample:
const = (m_ho(MA_NO,band)**1.5)*(d_o_ho(MA_NO,phon_mode)**2.0)
1 *N_op_h/(2.0d0**1.5)/pi/density(MA_NO)/
2 hw_op_ho(MA_NO,phon_mode)
Above is a code sample that will not compile with gfortran(4.1.12) in a
file with the extension .f
For reference, I am using Ubuntu Edgy Eft (6.10) x86-64 with the Ubuntu
gfortran package given in their source-base.
Any suggestion as to how to get this code to compile would be appreciated.
Thanks,
Ewan