I am trying to compile a file with pgf90 or pgfortran(that can handle all kinds of source files i.e. f90 or f77) that is written with fortran 77 constructs(i.e. has a .f extension). The question I have is with line continuation.
open(10,file='/home/adaba/original/potentialenergy/vorticity/data/run/fort.10')
So this line clearly goes beyond column 72. Here is what I tried. I tried breaking this up into two lines by using the '&' character at column 6 in the new line and compiled it. It compiles fine but when I run the program I get an error saying no such file found because it interprets the line continuation as an extra space between run and fort.10 and it reports file not found.
So I kept the code in one line and then added -Mextend which is pgi specific instruction for line extension. Now it seems to add some weird characters to the end of another file name much later in a subroutine. It does open fort.10 properly but it fails to open another file much later in the code and adds some weird characters to end of that file(in binary). In Emacs which is my editor I can see only purple color after the fort.10 statement (indicating that something is not right).
Can somebody with pgi fortran experience help ?
UPDATE
open(10,file='/home/adabas/originalPV/potentialenergy/vorticity/' // &
& 'data/run/fort.10')
I get a pgf90-s-0034 syntax error at or near &(on the upper line)
The pgf version is 17.0.4 64 bit
-Mextendis added. - Ross