4D v14.3

C_OBJECT

Home

 
4D v14.3
C_OBJECT

C_OBJECT 


 

C_OBJECT ( {method ;} variable {; variable2 ; ... ; variableN} )  
Parameter Type   Description
method  Method in Name of method
variable  Variable in Name(s) of variable(s) or parameter(s) ${...} to declare

The C_OBJECT command assigns the Object type to all the variables that are specified.

The Object type is supported by the 4D language starting with v14. Objects of this type are managed by the commands of the Objects (Language) theme.

You use the first syntax of the command (when the method parameter is not passed) to declare and type a process, interprocess or local variable. This syntax can be used in interpreted databases.

You use the second syntax of the command (when the method parameter is passed) to declare the method’s result and/or parameters ($0, $1, $2, etc.) to the compiler in advance. You must use this syntax if you want to skip the variable typing phase in order to save time when the database is compiled.

WARNING: You cannot execute the second syntax in interpreted mode. For this reason, when you use this syntax, you should store it in a method (whose name must begin with "COMPILER") that is not executed in interpreted mode.

Advanced use: You can use the C_OBJECT(${...}) syntax to declare a variable number of parameters of the same type for a method as long as they are the last parameters of this method. For example, the declaration C_OBJECT(${5}) indicates to the compiler that beginning with the fifth parameter, the method can receive a variable number of parameters of this type.

Example  

Refer to the Compiler Commands section.

 
PROPERTIES 

Product: 4D
Theme: Compiler
Number: 1216

 
HISTORY 

New
Created: 4D v14

 
SEE ALSO 

ARRAY OBJECT
Objects (Language)

 
ARTICLE USAGE

4D Language Reference ( 4D v14 R2)
4D Language Reference ( 4D v14 R3)
4D Language Reference ( 4D v14.3)
4D Language Reference ( 4D v14 R4)