fpt and WinFPT Reference Manual - Command-line Commands
| SimCon Home | Reference Manual Home |
ARGUMENT CHECK TO ....
ARGUMENT CORRECTION TO ....
ARGUMENT CHECK TO CHECK ARRAY BOUNDS ARGUMENT CHECK TO CHECK ARRAY RANK ARGUMENT CHECK TO CHECK CHARACTER SIZES ARGUMENT CHECK TO CHECK DEFAULT SIZES ARGUMENT CHECK TO CHECK REAL [AND] COMPLEX ARGUMENT CHECK TO CHECK STRUCTURE OF RECORDS ARGUMENT CHECK TO CHECK %VAL(0) ARGUMENT CHECK TO CHECK NULL ADDRESSES ARGUMENT CHECK TO CHECK ALL ARGUMENT CHECK TO IGNORE ... ARGUMENT CORRECTION TO CHECK ...
The commands CHECK ARGUMENTS and CORRECT ARGUMENTS instruct fpt to check that the arguments passed to subroutines and functions are consistent, and in the case of CORRECT ARGUMENTS, to attempt correction if they are not. The commands ARGUMENT CHECK TO... and ARGUMENT CORRECTION TO ... adjust the sensitivity of the check. The filter commands are equivalent. Each command sets the filters both for checks and for corrections.
ARGUMENT CHECK TO CHECK ARRAY BOUNDS
- controls reporting of inconsistent array bounds between the actual and formal arguments. This does not necessarily indicate an error. There are many occasions where it is convenient to pass an address within a large array which will be treated as the base address of a smaller array in a sub-program.
ARGUMENT CHECK TO CHECK CHARACTER SIZES
- controls reporting of character arguments of inconsistent lengths. In many systems, no error occurs when the lengths of actial and formal arguments are different.
ARGUMENT CHECK TO CHECK DEFAULT SIZES
- controls reporting of an inconsistency where the data sizes of the objects are consistent, but the size is declared explicitly in one case (e.g. REAL*4 X) and is inferred from the system defaults in another (e.g. REAL X). The check is made because an error would occur if the code were ported to a system with different default sizes. However, the arguments should be passed correctly in the current environment. Default data sizes are specified by commands of the form DEFAULT INTEGER SIZE = 4.
ARGUMENT CHECK TO CHECK REAL AND COMPLEX
- controls reporting of the case where the formal argument is of type COMPLEX and the actual argument is of type REAL, or vice versa, the kinds of the arguments match (i.e. the data size of the complex argument is twice that of the real) and the real argument has an additional leading dimension of (1:2). It is common practice to change the representation of complex variables across a call-site in this way, in this does not usually indicate an error.
ARGUMENT CHECK TO CHECK STRUCTURE OF RECORDS
- controls reporting of the case where the formal argument is a record of a structure, and the actual argument is a structure or array of the same size. Often, it is sufficient to reserve sufficient memory for an argument of type record, and the internal organisation of the record is of no immediate consequence.
ARGUMENT CHECK TO CHECK %VAL(0)
ARGUMENT CHECK TO CHECK NULL ADDRESSES
These commands are equivalent. They control the case where an actual argument has been entered as %VAL(0). Integer*4 zero, passed by value, is used to flag unused optional arguments in many systems. The usage usually does not indicate an error.
Please use the form of the command ARGUMENT CHECK TO CHECK NULL ADDRESSES on the Windows or DOS command line or in Windows or DOS batch files. The % character interferes with command line processing.
ARGUMENT CHECK TO CHECK ALL
- turns reporting on or off for all of the optional cases listed above.
Where to Use these Commands
|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||No|
(Note that defaults may be changed in the configuration file)
ARGUMENT CHECK TO CHECK DEFAULT SIZES ARGUMENT CHECK TO CHECK ARRAY BOUNDS ARGUMENT CHECK TO CHECK CHARACTER SIZES ARGUMENT CHECK TO CHECK %VAL(0)
In a specification (FSP) file:
%argument check to ignore array bounds %check arguments
Interactively, to the FPT> prompt
FPT> arg check to ignore char sizes
FPT> arg check to ignore array bounds
FPT> check arg
CORRECT INCONSISTENT ARGUMENTS
IGNORE DEFAULT SIZES
Copyright ©1995 to 2016 Software Validation Ltd. All rights reserved.