[petsc-dev] make all PETSc Fortran examples modern freeform?
Jed Brown
jedbrown at mcs.anl.gov
Thu Nov 7 09:12:50 CST 2013
Blaise A Bourdin <bourdin at lsu.edu> writes:
> Damn it! Considering that fixed form was declared obsolete 10 years
> ago, and if this is the only incompatibility, is it too much to ask
> that fortran people replace a "C" in first col with a "!" (which is
> also compatible with fixed form)?
Continuation lines are incompatible
$ cat foo.f
program foo
x = 1.0
& + 2.0
end program
$ gfortran -ffree-form foo.f
foo.f:3.6:
& + 2.0
1
Error: Invalid character in name at (1)
To write polyglot line continuations, you place the free-form
continuation character in column 72 or higher where it is ignored by
fixed-form (unless -ffixed-line-length-* is used), and also place the
fixed-form continuation character in column 5:
program foo
x = 1.0 &
& + 2.0
end program
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20131107/000fc6ec/attachment.sig>
More information about the petsc-dev
mailing list