isNull()

The javaLib.isNull() system function returns a value (1 for true, 0 for false) to indicate whether a specified identifier in the EGL Java™ object space refers to a null object.

For more about the EGL Java object space in which javaLib.isNull() and similar functions operate, see Java access functions. EGL maintains this method of Java access for compatibility with earlier versions. For new code, use the more powerful ExternalType syntax; for more information, see ExternalType part.

Syntax

  javaLib.isNull(identifier javaObjID in)
  returns (result INT)
identifier

An identifier that refers to an object in the object space. Input can be any variable or expression that is assignment compatible with the STRING type (see "Assignment compatibility in EGL"). The identifier must be cast to objID. EGL strips single- and double-byte blanks from the beginning and end of the argument value, which is case sensitive.

result
Either 1 for true or 0 for false.

Example

The following example tests an object to see if it is null, casting the object as objID:

  nullFlag = javaLib.isNull(valueId as "objID:java");
  
  if( nullFlag == 1 )
    error = 12;
  end 

Error considerations

If the v60ExceptionCompatibility program property is not set or set to NO, an exception causes EGL to throw a JavaObjectException. Other errors cause EGL to throw a RuntimeException.

If the v60ExceptionCompatibility program property is set to YES, an error during processing of javaLib.isNull() can set sysVar.errorCode to a value listed in the next table.

Table 1. isNull() error codes
Value in sysVar.errorCode Description
00001001 The specified identifier was not in the object space

Feedback