Blaise A Bourdin <[email protected]> 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

Attachment: pgpJuqyhhEsdb.pgp
Description: PGP signature

Reply via email to