Copyright Digital Equipment Corp. All rights reserved.

IARGCOUNT

 IARGCOUNT ()

 Class:  Inquiry function - Specific

 Returns the count of actual arguments passed to the current
 routine.  The result is of type default integer.  Functions with a
 type of CHARACTER, COMPLEX(KIND=8), REAL(KIND=16), and
 COMPLEX(KIND=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. Note that a declaration must be visible within the
 calling routine.

 The following example shows the IARGCOUNT intrinsic:

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