Products Downloads


French version


 

Syntax

{ ALPHA ( numcst ) }

 

{ NUM_E ( numcst1 , numcst2 ) }

 

{ NUM_P ( numcst1 , numcst2 ) }

 

{ BOOL }

 

{ DATE }

 

{ TIME }

 

{ TIMESTAMP }

 

{ NUM_BIN_2 }

 

{ NUM_BIN_4 }

 

{ NUM_BIN_8 }

 

{ VariableId }

This syntax can be used to refer to the specified user variable's Adelia definition.

{ AdeliaClassName }

Cast of a class instance.

 

Description

Cast can be used in the context of graphical object-type variables or class instance-type variables.

 

Context: graphical object-type variables

 

It is possible to provide read/write access to a Mixed (and as such non-defined) property by using special syntax:

<Cast> <object:MixedProperty>
(The cast instruction that forces the type always precedes the mixed property).

 

All 4GL instructions that can have a variable as a parameter can also have a mixed property with a cast type.

 

Whenever a property with an unspecified type (e.g. VALUE property for a GRAPHIC_OBJECT variable) is used, it must be preceded by a cast instruction.

 

Context: class instance-type variables

 

Used to assign, in a given class instance variable, the reference contained in a class instance variable which encompasses the given class.

DestClassiVariable = { DestClassName } OrigClassiVariable

where DestClassiVariable is declared as CLASS_REF(DestClassName)

where OrigClassiVariable is declared as CLASS_REF(*OBJECT)

 

 

Examples

Context: variables of graphic object type

GRAPHIC_OBJECT (INPUT_FIELD) MyGraphicObject

NUM_BIN_4 Result

 

Result = { NUM_BIN_4 } MyGraphicObject:VALUE

Result = { Result } MyGraphicObject:VALUE

 

Context: variables of class instance type

REF_CLASS(*OBJECT) iObject

REF_CLASS(PERSON) iPerson

...

IF iObject PERSON_INSTANCE

iPerson = { PERSON } iObject

END

 

Back to the description of the GRAPHIC_OBJECT instruction

Back to the description of the assignment operator

 

 

 

↑ Top of page


  • Aucune étiquette