FPT and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Reference 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

Yes


Default:

No header file is inserted by default.

Example:

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