fpt and WinFPT Reference Manual - Command-line Commands
| SimCon Home | Ref Manual Home |
IGNORE DEFAULT SIZES
IGNORE DEFAULT SIZES CHECK DEFAULT SIZES
The commands CHECK DEFAULT SIZES and IGNORE DEFAULT SIZES deal with the situation where a variable is declared with an explicit data size or kind in one scope and declared without an explicit size or kind 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 or kind, 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
|Configuration file, config.fsp
|Specification (fsp) files, *.fsp
|Interactively, to FPT> prompt
|Interactive command files
|Embedded in the Fortran code
CHECK DEFAULT SIZES
(Note that defaults may be changed in the configuration file).
Copyright ©1995 to 2024 Software Validation Ltd. All rights reserved.