This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com

Home

 
4D v20.6
OB Class

OB Class 


 

OB Class ( object ) -> Function result 
Parameter Type   Description
object  Object in Object whose class is to be returned
Function result  Object, Null in Class of object

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
 C_LONGINT($1;$2)
 This.area:=$1*$2

Then, in a method, you can write:

 C_OBJECT($poly;$class)
 $poly:=cs.Polygon.new(4;3)
 
 $class:=OB Class($poly)
  //$class contains Class: Polygon



See also 

OB Instance of

 
PROPERTIES 

Product: 4D
Theme: Objects (Language)
Number: 1730

This command can be run in preemptive processes

 
PAGE CONTENTS 
 
HISTORY 

Created: 4D v18 R3

 
ARTICLE USAGE

4D Language Reference ( 4D v20)
4D Language Reference ( 4D v20.1)
4D Language Reference ( 4D v20.2)
4D Language Reference ( 4D v20.3)
4D Language Reference ( 4D v20.4)
4D Language Reference ( 4D v20.5)
4D Language Reference ( 4D v20.6)