fpt and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Ref Manual Home |

INSERT HEADER FILE IN ALL SUB-PROGRAMS

Syntax:

INSERT HEADER [FILE] IN ALL SUB-PROGRAMS: <file>

Function:

An INCLUDE statement for the named file is inserted in all sub-programs. fpt reads the file, and uses the declarations which it contains to interpret the sub-program code, in exactly the same way as if the INCLUDE statement was already present in the code before fpt was run.

Multiple header files may be inserted. They are inserted in the order in which they are specified.

The INCLUDE file names may, but do not need to be written as quoted strings.

This command is useful in inserting INTERFACE or ALIAS statements for sub-programs when code is migrated to new environments.

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 header file is inserted by default.

Examples

The command:

% insert header file in all sub-programs: "vax_intrin.i"

inserts the INCLUDE statement:

INCLUDE 'vax_intrin.i'

at the start of every program, subroutine, function or block data sub-program. The header file is not inserted into internal or module sub-programs. The INCLUDE statement is written after the last IMPLICIT and global SAVE statement. IMPLICIT and SAVE statements may be moved from existing INCLUDE files to the files containing the sub-program declaration statements if this is necessary to preserve a legal ordering of statements.

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