Skip to main content
Version: 20 R7 BETA

OB Values

OB Values ( object ) -> Function result

ParameterTypeDescription
objectObjectObject to return property values
Function resultCollectionCollection of property values (variant)

This command is not thread-safe, it cannot be used in preemptive code.

Description

The OB Values command returns a collection of variants containing all of the enumerable property values of the object.

The order of values within the returned collection follows the definition order of the properties.

Example

You want a collection with all property values of an object:

 var $person : Object
 var $col : Collection
 
 $person:=New object
 $person.lastName:="Smith"
 $person.firstName:="Jenny"
 $person.children:=New object("Mary";12;"Mark";8)
 
 $col:=OB Values($person)
 
  //$col[0]="Smith"
  //$col[1]="Jenny"
  //$col[2]={"Mary":12,"Mark":8}

See also

OB Entries
OB Keys