FPT and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Reference Manual Home |


SEARCH FOR EXTERNAL PARAMETERS IN ...

Syntax:

      SEARCH FOR EXTERNAL PARAMETERS IN [:] <file> {<file>}

Function:

EXTERNAL PARAMETERs are Fortran PARAMETERS which are known to the linker. They are declared in the code by an external declaration and by an optional data type declaration. They are referenced in the code to return a value by the intrinsic %LOC. They are used under VMS, and are not accepted by most other systems. For example:

EXTERNAL FOR$_ENDDURREA,FOR$_RECNUMOUT : : CALL FETCH(KAPPA,CTRL_LUN,IE) IF (IE .EQ. %LOC(FOR$_ENDDURREA)) THEN GOTO 999 ENDIF

DEC, Compaq and later, HP provided INCLUDE files in which all of the Fortran system parameters are declared.

The command SEARCH FOR EXTERNAL PARAMETERS instructs FPT to search the named files for objects which appear to be EXTERNAL PARAMETERs in the code. If they are identified, standard Fortran 77 data type and PARAMETER declarations are inserted for them, and the %LOC() function is removed. Objects which appear to be EXTERNAL PARAMETERs for which no declaration is found are marked by warnings.

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

No


Default:

No search is made by default, and no warnings are issued.

Examples:

The specification file to handle the EXTERNAL PARAMETERs contains:

% input directory: vms:
% search for external parameters in: -
$fordef.inc        -
$foriosdef.inc     -
$fabdef.inc        -
$xabdef.inc        -
$rabdef.inc        -
$rmsdef.inc

The example shown above is rewritten as:

! FPT EXTERNAL FOR$_ENDDURREA,FOR$_RECNUMOUT !---------------^-------------------------------------------------------- !!! FPT - 1541 Statement replaced by declaration of EXTERNAL PARAMETER !------------------------------------------------------------------------ INTEGER*4 FOR$_ENDDURREA PARAMETER (FOR$_ENDDURREA='001880C4'X) INTEGER*4 FOR$_RECNUMOUT PARAMETER (FOR$_RECNUMOUT='001880CC'X) : : CALL FETCH(KAPPA,CTRL_LUN,IE) IF (IE .EQ. FOR$_ENDDURREA) THEN !-------------------------------^----------------------------------------- !!! FPT - 1505 EXTERNAL PARAMETER changed to PARAMETER, %LOC removed !------------------------------------------------------------------------- GOTO 999 ENDIF


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