NULL intrinsic function
Standard: F77 F90 F95 F2003 F2008
Example Program
<Syntax>

NULL ( [ MOLD ] )

MOLD : pointer or allocatable of any type and rank;

Result : Same type, type parameters and rank as MOLD if present, otherwise determined by context.

<Semantics>

Depending on MOLD, or the surrounding context if MOLD is absent, the result is either a disassociated pointer or an unallocated allocatable entity.

Context Attributes taken from
target of pointer assignment pointer being assigned to
initialisation (in declaration or DATA) object being initialised
default initialisation component being default-initialised
value in a structure constructor component it is the value for
actual argument dummy argument

Note that in the case of an actual argument, MOLD cannot be omitted if any type parameter of the dummy argument is deferred (‘:’), or if the reference is generic and any attribute of that argument is required to resolve the generic.

<Related>
ALLOCATABLE attribute, ALLOCATED intrinsic function, ASSOCIATED intrinsic function, Component Definition statement, DATA statement, NULLIFY statement, POINTER attribute, Pointer assignment statement, Type Declaration statement.