isObjID()

The javaLib.isObjID() system function returns a value (1 for true, 0 for false) to indicate whether a specified identifier is in the object space.

For more about the EGL Java™ object space in which javaLib.isObjID() 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.isObjID(identifier javaObjId in)
  returns (result INT)
identifier

A case-sensitive 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. The identifier must be cast to objID. EGL strips single- and double-byte blanks from the beginning and end of the argument value.

result
Either 1 for true (object present) or 0 for false.

Example

The following example tests to find if an object exists, casting the object as a Java objID:

  isPresent = javaLib.isObjID(valueId as "objID:java");
  
  if( isPresent == 0 )
    error = 27;
  end 

Feedback