& and line continuation

andrealphus andrealphus@gmail.com
Wed Jun 13 19:37:00 GMT 2007


Hello everybody!

Im new to the fortran language and am working my way through Chapmans
"Fortran 90/95" book.

I keep running into a problem that is getting quite annoying.

I get errors whenever I try and compile any code that has the "&" used
for line continuation.

example

     WRITE (*,*) 'Why does gfortran not'
      &'like me?'

would give me an error. (Same with all imaginable combinations of
placing the ampersand some where else: top line, inside quotes,
outside quotes, etc...)

I just cant figure out how to line continue for the life of me.

(I get the same error for continuing expressions..)

     number = 1 * 5 +    &
            10

w/ get me an unclassifiable statement error.

Im running the March 2007 build of gfortran with the Xcode plugin
(from macresearch.org), on a G4

Any help you could give me would be awesome



More information about the Fortran mailing list