9.3.59 IARGCOUNT ( ) (VMS only)

Description:  Returns the count of actual arguments passed to the current routine.  
Class:  Inquiry function; Specific 
Arguments:  None. 
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. For more information, see Section 5.19.

Formal arguments of type CHARACTER cannot be omitted. Formal arguments that are adjustable arrays (see Section 5.1.4.1) 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


Previous Page Next Page Table of Contents