fpt and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Ref Manual Home |

INLINE

Syntax:

!% INLINE

Function:

The command INLINE is used to mark a sub-program or a sub-program call which is to be expanded inline. It is written in the Fortran code, and must be introduced by the character % written in column 2 immediately after a comment delimiter. The command is written on the line immediately before the sub-program declaration or sub-program call. If a sub-program declaration is marked, all calls to the sub-program are expanded. If a single call site is marked, inline expansion is carried out for that call site only.

Inline expansion is carried out in response to the EXPAND INLINE command. Sub-programs are expanded inline, starting with the most deeply nested.

Inline expansion may be suppressed by the commands:

This is useful when !% INLINE directives have been written in the code, but fpt is used only for checking or reformatting.

Where to Use this Command

Operating system command line No
Configuration file, config.fsp No
Specification (fsp) files, *.fsp No
Interactively, to FPT> prompt No
Interactive command files No
Embedded in the Fortran code Yes

Default

Sub-programs are not expanded inline by default.

Examples:

In the Fortran code, to expand all occurrences of a sub-program:

!%INLINE REAL(KIND=kr4) FUNCTION rlim(x,hi,lo)

To expand an individual call

!%INLINE CALL swap(linklis,i,iprev)

See Also

EXPAND INLINE

EXPAND INLINE AS MARKED

IGNORE COMMANDS IN THE CODE

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