Topic: CONTINUATION statements in Fixed Format source code

I have a fixed format source file saved as 'HARMOSC.FOR'.  It is attached to the project.  It contains the following statement:

       open (8,file='C\GLN\Sci_Source\FLIBS\harmout.txt',
     X   status='UNKNOWN')

I am trying to set up a new file (UNIT 8) to which I will write the output data.  The "X" is in column 6, which means the statement following is to be interpreted as a continuation statement for the previous line.

When I compile the code, everything seems to compile normally.  I get an output module called 'HARMOSC.o', and an executable module.  When I attempt to launch the thing, I get the following message:

"At line 16 of file .\HARMOSC.FOR(UNIT=8,FILE='#^1)'
FORTRAN RUNTIME ERROR:  FILE 'c\gln\Sci_Source\FLIBS\harmout.txt' does not exist'

Press any key to continue. "

It appears from this that the file name has been garbled, probably because it did not recognize the continuation symbol in column 7.  What's going on?  Is there a fix for this?

Re: CONTINUATION statements in Fixed Format source code

Hi - maybe try adding a ":" after the "C" in "C\GLN\..." - it may not have anything to do with the continuation.

Re: CONTINUATION statements in Fixed Format source code

Post to PETESUN:  You are correct.  Insertion of the colon (:) corrected the problem.  Thanks for your input.

Re: CONTINUATION statements in Fixed Format source code

Glad to help. I'd have to say that the runtime error message is quite misleading, so I can see why it appeared the continuation was ignored.