fpt and WinFPT Reference Manual - Command-line Commands
| SimCon Home | Ref Manual Home |
[DO NOT] EXPAND INLINE
Sub-programs are expanded inline, starting with the most deeply nested.
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.
New INCLUDE 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||Yes|
|Specification (fsp) files, *.fsp||Yes|
|Interactively, to FPT> prompt||Yes|
|Interactive command files||Yes|
|Embedded in the Fortran code||Yes|
DO NOT EXPAND INLINE
(Note that defaults may be changed in the configuration file)
DELETE UNUSED SUB-PROGRAMS
Copyright ©1995 to 2021 Software Validation Ltd. All rights reserved.