Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Garbage collector (?)

Status
Not open for further replies.

fxlame

Technical User
Nov 8, 2013
4
US
Hi,
I am new to fortran and I *have* to work on a fortran77 code that somebody wrote a while ago.
I am trying to make sense of the errors that I get when I compile it and I hope that someone of you experts could help me.
In particular I have a line like this:

SUBROUTINE NAME_of_SUBROUTINE(NAME1,NAME2)gC Comment about the subroutine

When I compile using GFORTRAN I get:

Error: Syntax error in SUBROUTINE statement at (1)

Where (1) is placed under gC.
1. Is gC a "garbage collector"?
2. Once I remove it, I get no error. Do I have to add some additional package? Or can I just remove it?

Thanks. Cheers
Fox
 
Garbage Collecor? In Fortran? It'đ good joke :)

When it's in F77 fixed form it should be probably something like
Code:
      SUBROUTINE NAME_of_SUBROUTINE(NAME1,NAME2)
C     Comment about the subroutine
C on the beginning of the line stands for Comment.
Don't know what does mean the g - maybe instead of it you shoud have there a new line character?
 
It is probably a typo that came about after accidentally pressing the keyboard.

It is always a good idea to keep a copy of the original file handed over to you before you start making changes...granted, who know if the code handed to you was working in the first place.

As mikrom says, you can safely assume that from 'C' to the rest of the line, it was meant to be in the following line; delete the 'g'.
 
Thanks guys. For that little that I know about fortran, this was my guess too.
Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top