FPT and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Reference Manual Home |


EXPAND INLINE

Syntax:

[DO NOT] EXPAND INLINE

Function:

Sub-programs are expanded inline, starting with the most deeply nested.

Renumbering Labels

All statement labels are renumbered, so as to avoid clashes between labels in the expanded sub-programs and those into which they are expanded. Renumbering is carried out in the same way as by the RENUMBER LABELS command.

Data Dictionary Files

The variables, statement functions and parameters in the expanded sub-programs are moved to INCLUDE files which are referenced in the sub-programs which receive the expansions.

DATA statements in the sub-programs expanded are written to a new BLOCK DATA sub-program in a new primary file. The block data file name is taken from the base file name of the first input file, with the suffix _BDA and the current primary output file name extension. NOTE: THIS SUB-PROGRAM MUST BE COMPILED AND LINKED WITH THE PROGRAM!

The new files are similar in organisation to those generated by the DATA DICTIONARY command.

Deleting unused sub-programs

If all of the calls to a sub-program are expanded inline, the sub-program code may no longer be required to build the program. Unused sub-programs are deleted from the code written by FPT by the command DELETE UNUSED SUB-PROGRAMS . They are not, of course, deleted from the input files.

Expanding Only Selected Sub-programs Inline

Selected sub-programs or calls may be marked for inline expansion by the !%INLINE directive embedded in the code. If the directive is embedded at the sub-program SUBROUTINE or FUNCTION statement, all calls are expanded in-line. If it is embedded at the call-site, only the marked call is expanded.

Where to use this command:

Operating system command line

Yes


Configuration file, config.fsp

No


Specification (FSP) files, *.fsp

Yes


Interactively, to FPT> prompt:

Yes


Interactive command files

Yes


Embedded in the Fortran code

Yes


Default:

DO NOT EXPAND INLINE

(Note that defaults may be changed in the configuration file)

Example:

$ fpt stats.fsp %expand_inline

See also:

DATA DICTIONARY

DELETE UNUSED SUB-PROGRAMS

INLINE

RENUMBER LABELS


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