fpt and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Ref Manual Home |

DECLARE ALL SYMBOLS

Syntax:

[DO NOT] DECLARE ALL SYMBOLS [DO NOT] DECLARE ALL VARIABLES

Function:

Data type declarations are inserted for all undeclared variables, Fortran parameters, statement functions and functions, and for all arrays which are declared only in DIMENSION statements.

By default, the declarations specify the data sizes of numeric variables. Thus, for example, an integer might be declared as INTEGER*4. The data sizes for each type are changed by commands of the form DEFAULT LOGICAL SIZE: 2. Declaration of the data sizes is suppressed by the command REMOVE NUMERIC SIZES. The data sizes of objects of type CHARACTER are always specified.

The data size specifications may be replaced by Fortran KIND specifications by the command CHANGE DATA SIZES TO KINDS.

The declarations are inserted immediately after the last SAVE statement without arguments, or the last IMPLICIT statement, and are inserted in the same file as the sub-program declaration statement. If there are no SAVE or IMPLICIT statements, they are written after the sub-program declaration statement itself. If the SAVE statements without arguments or IMPLICIT statements are written in INCLUDE files, they are moved to the file containing the sub-program declaration. If the INCLUDE file is shared by several sub-programs, this may involve the insertion of the IMPLICIT or SAVE statements in all of them.

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

DO NOT DECLARE ALL SYMBOLS

(Note that defaults may be changed in the configuration file)

Examples

The fsp file contains the command:

% declare all symbols

The original code contains no type declarations, but the lines:

SUBROUTINE CONTROLS IMPLICIT CHARACTER*8 (C) : PARAMETER PHILIM=42.5 DIMENSION AA(100) : ! Statement function for asymmetric limiter BOUND(X,XMIN,XMAX)=MIN(XMAX,MAX(XMIN,X)) : I=1 : THETA=FCNI(THDEM,THTAB,17) : C='CONTROLS'

Note that:

fpt inserts the declarations:

! *************************************************************** ! REAL*4 PHILIM REAL*4 AA CHARACTER*8 C INTEGER*4 I REAL*4 THDEM REAL*4 THETA REAL*4 THTAB REAL*4 BOUND REAL*4 FCNI REAL*4 X REAL*4 XMAX REAL*4 XMIN ! ! ***************************************************************

and modifies the PARAMETER statement for PHILIM to:

PARAMETER (PHILIM=42.5)

See Also

DEFAULT SIZE

REMOVE NUMERIC SIZES

CHANGE DATA SIZES TO KINDS

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