Determining whether a pointer field is pointing at anythingΒΆ


Determine whether a pointer field is pointing to anything



Returns TRUE if the specified pointer field is null, i.e. does not point to another object, otherwise FALSE.

A pointer field is a temporary field declared with the !temp declaration and assigned the special type p. It points to the null object until assigned an object identifier. It then points to this object, and may be used as if it were the object pointed to.

The isnull() function makes it possible to distinguish between the pointer itself being null and the object being pointed to having a null value.


!temp PointerField,,p
!temp Number,,i4
!temp Pointing,,u1

     PointerField = &Number
     Pointing = isnull(PointerField)          /*  returns FALSE  */

     PointerField =&NULL
     Pointing = isnull(PointerField)          /*  returns TRUE  */


Pointer fields