fpt and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Ref Manual Home |

INSERT ARGUMENT COUNT

Syntax:

INSERT ARGUMENT COUNT [:] <symbol> [ [,] <symbol> ]...

Function:

A new leading argument is added to all invocations of each named subroutine or function which is the count of the total number of arguments after the insertion (i.e. including the new argument). The argument is written as an integer literal number. The fpt directive ARGUMENT COUNT INSERTED is written in a comment immediately in front of the modified statement. This signals to fpt that the insertion has been made, and prevents multiple insertions if fpt is re-run.

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

Default

No change is made by default.

Examples

The subroutine MPLOT accepts a variable number of arguments. fpt is run with an fsp file containing the command:

% insert argument count: MPLOT

The original source reads:

CALL MPLOT(X1,Y1,X2,Y2) CALL MPLOT(XA1,YA1,XA2,YA2,XA3,YA3)

The code output by fpt is:

!% ARGUMENT COUNT INSERTED: MPLOT CALL MPLOT ( 5, X1, Y1, X2, Y2 ) !% ARGUMENT COUNT INSERTED: MPLOT CALL MPLOT ( 7, XA1, YA1, XA2, YA2, XA3, YA3 )

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