This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gfortran



[ back to the list, I'm not The Fortran Service ]


Hi again,

Creekmore Torreon N Dr NGA-IBR USA CIV wrote:
I do rename my files as you say, and that does not seem to work.

which comes no surprise, as your programs indeed are in fixed source form (in fact the programs seem to be FORTRAN 77, but I haven't spent much time looking for Fortran 90 stuff).


Some of the errors I get are:

Error: Unclassifiable statement at (1)
 In File rad.f90:5083
        c(i,j) = fq + wlw * p11d(i,j) +
                                      1
-it seems not to like 1 for a line continuation, should I use & instead.

The way it's done is correct for fixed-form source


I have attached to programs.

... which are not self-contained: they try to include 'para.file'. Without that file there's no way I could tell you what's wrong. But instead of delegating your job to me, it would probably be a simpler way of understanding the problem if you told us the first few error messages that you get if you try to compile the program (named with the correct extension '.f').


Cheers,
- Tobi



-----Original Message-----
From: Tobias Schlüter [mailto:tobias.schlueter@physik.uni-muenchen.de] Sent: Tuesday, September 22, 2009 5:11 PM
To: Creekmore Torreon N Dr NGA-IBR USA CIV
Cc: fortran@gcc.gnu.org
Subject: Re: gfortran



Hi,


Creekmore Torreon N Dr NGA-IBR USA CIV wrote:
I would like to know if the gfortran complier will work with fortran 90 programs on Linux. When I try to compile I get several errors (many have to do with "c" to comment out a line) for my fortran 90 programs. The command I use is: gfortran program1.f program2.f.

Does gfortran support Fortran 90 programs?

Yes. Unfortunately, your problem description is a bit unspecific. My guess is that you're source files are free-form source files despite their .f exension. gfortran tries to guess the source-form you're using from the file extension: .f for fixed form, .f90, .f95, .f03 for free form. If you don't want to rename your files to follow that convention and that is indeed the problem you can use the -ffree-form command line option.


If that's not the problem, you may want to try to give some more details, like, say, the error messages that you're getting.

Cheers,
- Tobi


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]