/sys$common/syshlp/helplib.hlb
FORTRAN, Statements, SAVE

 *Conan The Librarian (sorry for the slow response - running on an old VAX)

  Declares that the values of data elements are to be saved across
  invocations of a subprogram.  Statement format:

     SAVE [a[,a]...]

     a  Is the symbolic name of a common block (enclosed in
        slashes), a variable, or an array.

  A SAVE statement cannot include a blank common block, names of
  entities in a common block, procedure names, and names of dummy
  arguments.

  Within a program unit, an entity listed in a SAVE statement does
  not become undefined upon execution of a RETURN or END statement
  within that program unit.

  Even though a common block can be included in a SAVE statement,
  individual entities within the common block could become undefined
  (or redefined) in another program unit.

  When a SAVE statement does not explicitly contain a list, it is
  treated as though all allowable items in the program unit are
  specified on the list.

  NOTE:  It is not necessary to use SAVE statements in Compaq Fortran
  programs.  The definitions of data entities are retained
  automatically by default, unless you specify the /RECURSIVE
  compiler option.  (Optimizations can also affect this.  See your
  user manual for more information.) However, the ANSI FORTRAN
  Standard requires using SAVE statements for programs that depend on
  such retention for their correct operation.  If you want your
  programs to be portable, you should include SAVE statements where
  your programs require them.

  The omission of such SAVE statements in necessary instances is not
  flagged, even when you specify the /STANDARD=(SEMANTIC,SYNTAX)
  compiler option, because the compiler does not determine whether
  such dependences exist.
  Close     HLB-list     TLB-list     Help  

[legal] [privacy] [GNU] [policy] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.