XL Fortran for AIX 8.1

Language Reference

+---------------------------------Fortran 95---------------------------------+


NULL(MOLD)

This function returns a pointer or designates an unallocated allocatable component of a structure constructor. The association status of the pointer is disassociated.

You must use the function without the MOLD argument in any of the following:

You can use the function with or without the MOLD argument in any of the following:

MOLD (optional)
must be a pointer and can be of any type. The association status of the pointer can be undefined, disassociated, or associated. If the MOLD argument has an association status of associated, the target may be undefined.

Class

Transformational function.

Result Type and Attributes

If MOLD is present, the pointer's type, type parameter, and rank are the same as MOLD. If MOLD is not present, the entity's type, type parameter and rank are determined as follows:

Result Value

The result is a pointer with disassociated association status or an unallocated allocatable entity.

Examples

! Using NULL() as an actual argument.
INTERFACE
   SUBROUTINE FOO(I, PR)
      INTEGER I
      REAL, POINTER:: PR
   END SUBROUTINE FOO
END INTERFACE
 
CALL FOO(5, NULL())

+-----------------------------End of Fortran 95------------------------------+


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]