FPT and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Reference Manual Home |


INSERT ARGUMENT COUNT

Syntax:

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

Function:

A new leading argument is added to all invocations of the 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.

Example:

The subroutine MPLOT accepts a variable number of arguments. FPT is run with and 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 2014 Software Validation Ltd. All rights reserved.