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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

save command

Status
Not open for further replies.

garynewport2

Instructor
Jun 16, 2011
9
GB
Hi

I am new to Fortran (but not programming) and understand that the save command causes the variables of a subroutine to become static prior to an end or return statement but I have this in the code I have received:

Code:
      include 'parm.h'
      include 'xvar.h'
      data ifirst/0/
      data zMmin/9.945d31/

      save

This is the first 5 lines of the code, so there is no return or end statement at this point (there are loads of lines to run after this; the bulk of the work!).

I'm assuming that this save simply causes the first 2 variables (ifirst and zMmin) to become static, but not subsequent variables?
 
 
So, the placing of the save command has no relationship to the variables being set to static?
Wow!
Thank you. :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top