Help answer threads with 0 replies.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 10-15-2009, 05:24 PM   #1
LQ Newbie
Registered: Sep 2009
Posts: 3

Rep: Reputation: 0
gfortran: Syntax error in DATA statement at (1)


I am relatively new to fortran.
I am trying to compile a fortran software which has multiple fortran programs, majority of which are Fortran 77 and few are written in Fortran 90. I only have access to the gfortran compiler to run the code.

When I use the 'make' command, I get the following error:


data hk13h2o / 0.874946 , 0.028572 , 0.067003 , 0.021822 , 0.00765
Error: Syntax error in DATA statement at (1)

data hk11h2o / 0.444198 , 0.385220 , 0.126262 , 0.037311 , 0.00700
Error: Syntax error in DATA statement at (1)
make: *** [dkfrwn_0599.o] Error 1

The DATA statement is used at other instances in the code in previous lines as well but the syntax error appears for these two lines.

I had an earlier opportunity to test this software on pgf90 and there was absolutely no error with it. Now I only have access to gfortran to run the code. Could this be a compiler specific error?

Any suggestions will be greatly appreciated. I am also attaching the makefile (it is the same makefile which worked with pgf90).

Thanks alot,

Attached Files
File Type: txt makefile.txt (3.1 KB, 68 views)
Old 10-16-2009, 12:10 AM   #2
Registered: Sep 2004
Distribution: FC, ubuntu, OpenSuse
Posts: 112

Rep: Reputation: 16
hey, fortran isn't my forte, however I have used it here and there. In my limited experience pg compilers don't play nice with the gnu ones. Anyway!

I wonder if its a fixed vs free form thing. I believe the ".f" extension tells gfortran that this is f77 source. Try adding "-ffree-form" to your flags.

Does that make any difference


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
gfortran: error trying to exec 'f591': on SUSE 11.0 scottrsm Linux - Newbie 1 07-02-2009 08:38 AM
gfortran runtime error saray Linux - Software 1 05-02-2009 10:56 AM
[Python] Invalid Syntax - If statement LinuxCrayon Programming 4 12-07-2007 09:11 AM
Gfortran compile error aukuntin Linux From Scratch 2 01-28-2007 08:08 PM
htdig.conf start url: statement syntax for local indexing. AwesomeMachine Linux - Software 0 05-02-2006 02:02 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:15 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration