This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v20.6
cs
|
cs -> Function result | ||||||||
Parameter | Type | Description | ||||||
Function result | Object |
![]() |
Class Store containing all classes of the current database | |||||
The cs command returns a Class Store object containing all user classes defined in the current database or component. This command is necessary to instantiate an object from a user class.
Note: This command works in project databases only. In binary databases, cs returns an empty Class Store.
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)
$poly:=cs.Polygon.new(4;3)
// {area:12}
Product: 4D
Theme: Language
Number:
1710
Created: 4D v18 R3
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)