fpt and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Ref Manual Home |

CHECK NAMES

Syntax:

[DO NOT] CHECK NAMES

Function:

fpt checks that names are used consistently in different sub-programs. fpt reports an inconsistency if the same name is used in different contexts for:

  1. Objects of different functional types, for example Fortran parameters, arguments, variables, statement functions etc.
  2. Objects of different data types, for example INTEGER and REAL.
  3. Objects of different kinds or data sizes, for example INTEGER(KIND=2) and INTEGER(KIND=4).
  4. Objects with different COMMON block addresses.
  5. Objects with different array bounds.
  6. Fortran parameters with different values.
  7. Fields or derived type components at different addresses within their records or derived types.

The sensitivity of the name check is controlled by the commands:

NAME CHECK TO {CHECK|IGNORE} DEFAULT SIZES

- controls reporting of an inconsistency when the same name is used for a logical or numeric object which has an explicitly declared data size in one sub-program and an implied size in another. For example, where X is declared REAL*4 X in one sub-program and REAL X in another.

NAME CHECK TO {CHECK|IGNORE} ARRAY BOUNDS.

- controls reporting of inconsistent array bounds between objects with the same name in different sub-programs.

NAME CHECK TO {CHECK|IGNORE} ARRAY RANK.

- controls reporting of inconsistent array rank and bounds between objects with the same name in different sub-programs.

NAME CHECK TO {CHECK|IGNORE} COMMON BLOCK NAMES

- controls reporting of the use of the same name for a variable and for a COMMON block.

NAME CHECK TO {CHECK|IGNORE} FIELD ADDRESSES

- controls checking that the addresses of fields with the same name have the same addresses within different structures and that type components with the same names have the same addresses within different derived types.

NAME CHECK TO {CHECK|IGNORE} FORMAL ARGUMENTS

- controls reporting of the inconsistency where a name is used for a formal argument in one sub-program and for a local variable in another.

NAME CHECK TO {CHECK|IGNORE} LOCAL VARIABLES

- controls checking of inconsistencies which involve ONLY local variables, sub-program formal arguments or statement function formal arguments.

NAME CHECK TO IGNORE ALL

- controls all of the optional checks described above.

Where to Use this Command

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 Yes

Default

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

Examples:

Windows command line

D:\>fpt iqn.f "/name check to ignore default sizes" "/check names"

Interactively to the fpt prompt:

FPT> name check to check all FPT> name check to ign arr bounds FPT> check names

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