FPT and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Reference 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

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 for each data type by default when no explicit size is specified. These commands do not modify the program code.

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

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

Yes


Default:

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

Example:

$ fpt heli %change_logical_size_to_4

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 2014 Software Validation Ltd. All rights reserved.