fpt and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Ref Manual Home |

SPECIFY GLOBAL SAVE

Syntax:

[DO NOT] SPECIFY GLOBAL SAVE [DO NOT] INSERT GLOBAL SAVE

Version:

This command is implemented in fpt versions 3.3-d and later.

Function:

fpt writes a SAVE statement without arguments immediately after the last IMPLICIT statement in each top-level sub-program in which global SAVE is legal and has not already been specified. If no IMPLICIT statement is present, the SAVE is written after the last USE statement or after the sub-program declaration statement.

Existing SAVE statements are commented out.

SAVE statements may not be written in sub-programs which are declared to be RECURSIVE, ELEMENTAL or PURE and these sub-programs are not modified.

This command addresses an issue in code migration. Global SAVE is the default behaviour, requiring no SAVE declaration, for VMS, MPX and some old PC compilers. Most Linux and Unix compilers claim local storage on a stack frame, and therefore do not save variables from one call to a sub-program to the next.

Where to Use this Command

Operating system command line Yes
Configuration file, config.fsp Yes
Specification (fsp) files, *.fsp Yes
Interactively, to FPT> prompt Yes
Interactive command files Yes
Embedded in the Fortran code Yes

Default

No change is made by default. (Note that defaults may be changed in the configuration file)

See Also

SPECIFY IMPLICIT NONE

DECLARE ALL SYMBOLS

Copyright ©1995 to 2024 Software Validation Ltd. All rights reserved.