FPT and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Reference Manual Home |


CHECK NAMES

Syntax:

[DO NOT] CHECK NAMES

Function:

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 data sizes, for example INTEGER*2 and INTEGER*4.

  4. Objects with different COMMON block addresses.

  5. Objects with different array bounds.

  6. Fortran parameter with different values.

  7. Fields or derivied type components at different addresses within their records or types.

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

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 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 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 FIELD ADDRESSES

- controls checking that the addresses of fields with the same name have the same addresses within different structures.


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:

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