fpt and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Ref Manual Home |

CHANGE SIZE

Syntax:

CHANGE { LOGICAL | INTEGER | REAL | COMPLEX } SIZE [TO] [:] <integer>

Function:

The CHANGE SIZE commands systematically change declaration statements throughout a program explicitly to specify and to change the data size of the named type. For example, the command, written in an fsp file:

% CHANGE INTEGER SIZE TO 4

changes the statements:

INTEGER FUNCTION IINDEX(I1) IMPLICIT INTEGER(H-Q) INTEGER*2 I,J,K

to read:

INTEGER*4 FUNCTION IINDEX(I1) IMPLICIT INTEGER*4(H-Q) INTEGER*4 I,J,K

The new sizes are used to compute the addresses of objects in COMMON blocks and of fields in records which are used by the name and argument checks and in the symbol and COMMON block listings (See CHECK NAMES, CHECK ARGUMENTS, SYMBOL LISTING and COMMON BLOCK LISTING).

The command CHANGE BYTE TO INTEGER*n changes BYTE declarations to INTEGER*n, where n is an integer.

The command CHANGE REAL*n TO DOUBLE PRECISION changes REAL declarations with the specified size to DOUBLE PRECISION declarations.

The command CHANGE DOUBLE PRECISION TO REAL*n changes DOUBLE PRECISION declarations to REAL declarations with the specified data size.

The commands DEFAULT <type> SIZE specify the data size which is to be used by fpt for each data type by default when no explicit size is specified. These commands do not modify the program code. They control the addresses computed by fpt.

The command SPECIFY NUMERIC SIZES inserts size specifications for all numeric types which correspond to the current default settings.

The command CHANGE SIZES TO KINDS systematically changes data size specifications in declarations to standard-conforming KIND specifications. For a discussion of the relative advantages of kind and data size specifications please see Whether to use kinds or data sizes.

Where to Use this Command

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

Default

Declaration statements are not changed by default (Note that defaults may be changed in the configuration file).

Examples

The command, written on the operating system comand line:

$ fpt heli %change_logical_size_to_4

changes the declarations:

LOGICAL erf LOGICAL*1 fl1,fl2

to:

LOGICAL*4 erf LOGICAL*4 fl1,fl2

See Also:

CHANGE BYTE TO INTEGER

CHANGE DOUBLE PRECISION TO REAL

CHANGE REAL TO DOUBLE PRECISION

CHECK ARGUMENTS

CHECK NAMES

COMMON BLOCK LISTING

DEFAULT SIZE

SPECIFY NUMERIC SIZES

SYMBOL LISTING

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