Skip to main content
Version: 20 R7 BETA

OB Is empty

OB Is empty ( object ) : Boolean

ParameterTypeDescription
objectObject, ObjectStructured object
Function resultBooleanTrue if object is empty or undefined, otherwise False

Description

The OB Is empty command returns True if object is undefined or empty, and False if object is defined (initialized) and contains at least one property.can be an object varialble or a 4D object field.

Example

Here are the different results of this command as well as the OB Is defined command, depending on the context:

 var $ref : Object
 $empty:=OB Is empty($ref) // True
 $def:=OB Is defined($ref) // False
 
 OB SET($ref;"name";"Susie";"age";4)
  // $ref="{"name":"Susie","age":4}"
 $empty:=OB Is empty($ref) // False
 $def:=OB Is defined($ref) // True
 
 OB REMOVE($ref;"name")
 OB REMOVE($ref;"age")
 $empty:=OB Is empty($ref) // True
 $def:=OB Is defined($ref) // True

See also

OB Is defined

Properties

Command number1297
Thread safe