FPT and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Reference Manual Home |


IGNORE DEFAULT SIZES

Syntax:

IGNORE DEFAULT SIZES

CHECK DEFAULT SIZES

Function:

The commands CHECK DEFAULT SIZES and IGNORE DEFAULT SIZES deal with the situation where a variable is declared with an explicit data size in one sub-program and declared without an explicit size in another. For example:

SUBROUTINE VECMAT INTEGER*4 VECLEN COMMON /VEC/ VECLEN : SUBROUTINE DETERM INTEGER VECLEN COMMON /VEC/ VECLEN :

If the default size of an integer variable is 2 bytes or 8 bytes, FPT will always recognise that the two versions of VECLEN are different objects. The default sizes for the data types are set by commands of the form DEFAULT LOGICAL SIZE etc.

If the default integer size is 4 bytes in this example, VECLEN is the same in both subroutines. However, there is a maintenance trap. If the code is moved to a system with a different default integer size, the two copies of VECLEN are no longer equivalent, and an error will probably occur. FPT treats the objects as different if CHECK DEFAULT SIZES is specified, and as equivalent if IGNORE DEFAULT SIZES is specified. In this example, the name and equivalence checks report a potential problem if default sizes are checked, and do not report a problem if default sizes are ignored.

Most of the checks carried out by FPT may individually be set to ignore or to check default sizes. The commands CHECK DEFAULT SIZES and IGNORE DEFAULT SIZES control this behaviour in all contexts.

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:

CHECK DEFAULT SIZES

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

See also:

CHECK EQUIVALENCE

CHECK NAMES

DEFAULT SIZE


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