[petsc-dev] make all PETSc Fortran examples modern freeform?

Blaise A Bourdin bourdin at lsu.edu
Thu Nov 7 09:00:26 CST 2013


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)?

Blaise 


On Nov 7, 2013, at 8:42 AM, Jed Brown <jedbrown at mcs.anl.gov> wrote:

> Blaise A Bourdin <bourdin at lsu.edu> writes:
> 
>> I haven’t use fixed-form in a long time, but isn’t free-form a
>> superset of fixed-form? Are there situation where a fixed form code
>> cannot be compiled as free form source code?
> 
> $ cat foo.f
>      program foo
> c     a silly comment
>      end program
> $ gfortran foo.f
> $ gfortran -ffree-form foo.f 
> foo.f:2:
> 
> c     a silly comment
> 1
> Error: Unclassifiable statement at (1)

-- 
Department of Mathematics and Center for Computation & Technology
Louisiana State University, Baton Rouge, LA 70803, USA
Tel. +1 (225) 578 1612, Fax  +1 (225) 578 4276 http://www.math.lsu.edu/~bourdin











More information about the petsc-dev mailing list