Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Parameter problem calling subroutine

Parameter problem calling subroutine

Parameter problem calling subroutine


I am a beginner programmer in Fortran, but has to modify some code. It has to do with adding an extra parameter to a subroutine. I thought this had to be easy, but i am overlooking something and i really do not know what.
In the subroutine TNKDAT() i use the following code to call a subroutine TNKUPD():


IMFSM is the parameter i added.

The definition of the subroutine TNKUPD is as follows:

I think it has something to do with declaring variables or the type of variables, but it is a wild guess for me...

The code will not compile and gives the following warning:
..\FORALS.NEW\O_MODB.FOR(617) : error F2115: syntax error
..\FORALS.NEW\O_MODB.FOR(646) : warning F4999: CN : variable declared but not used
..\FORALS.NEW\O_MODB.FOR(646) : warning F4999: TRICH : variable declared but not used
..\FORALS.NEW\O_MODB.FOR(646) : error F2837: label 90 : undefined
..\FORALS.NEW\O_MODB.FOR(746) : warning F4999: CN : variable declared but not used

RE: Parameter problem calling subroutine

See misspellings (dot instead of comma etc). Where is your 617 line (-3..+3 lines too) in the snippet? Obviously, it's not an extra parameter issue...

RE: Parameter problem calling subroutine

V is next to C on the keyboard.  Have you typed CN instead of VN?

RE: Parameter problem calling subroutine

I solved the problem. It had something to do with the column the statement was in. Did not know Fortran is so sensitive....

RE: Parameter problem calling subroutine

You're probably using either Fortran IV or 77.

Fortran II, IV and 77 labels in cols 1-5, continuation in col 6, code 7 to 72

Fortran 90, 95 and 2003 are free format.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close