OB Class
OB Class ( object ) -> Function result
Parameter | Type | Description | |
---|---|---|---|
object | Object | → | Object whose class is to be returned |
Function result | Null, Object | ← | Class of object |
Description
The OB Class command returns the class of the object passed in parameter. In 4D, all objects inherit from the Object class. If object is not an existing object, OB Class returns null.
Example
You created the Polygon class:
//Class: Polygon
Class constructor
var $1;$2 : Integer
This.area:=$1*$2
Then, in a method, you can write:
var $poly;$class : Object
$poly:=cs.Polygon.new(4;3)
$class:=OB Class($poly)
//$class contains Class: Polygon