IARGCOUNT (VMS only)

Inquiry Intrinsic Function (Specific): Returns the count of actual arguments passed to the current routine.

Syntax

result = IARGCOUNT( )

Results:

The result type is default integer. Functions with a type of CHARACTER, COMPLEX(8), or REAL(16) have an extra argument added that is used to return the function value.

Formal (dummy) arguments that can be omitted must be declared VOLATILE.

Formal arguments of type CHARACTER cannot be omitted. Formal arguments that are adjustable arrays cannot be omitted.

The standard way to pass and detect omitted arguments is to use the Fortran 95 features of OPTIONAL arguments and the PRESENT intrinsic function.

Examples

Consider the following:

   CALL SUB (A,B)
   ...
   SUBROUTINE SUB (X,Y,Z)
   VOLATILE Z
   TYPE *, IARGCOUNT()       ! Displays the value 2