‎2007 Sep 27 5:38 PM
Hi,
Below these are my variables
Circ
Circle
Circumference
radius
Area
and now i want to know what is this below syntax means. i mean to ask below they r using " =>" how this function will work exactly plz can anyone explain me ,it will be great helpful to me.
circ = circle=>circumference( radius ).
area = circle=>area( radius ).
‎2007 Sep 27 5:44 PM
circle=>circumference( radius ).
this means In a CLASS CIRCLE, u r calling the Method Circumfrence passing the value radius to the method.
circle=>area( radius ).
In a class CIRCLE, u are calling the method AREA passing the radius as variable.
Sri
‎2007 Sep 27 5:44 PM
circle=>circumference( radius ).
this means In a CLASS CIRCLE, u r calling the Method Circumfrence passing the value radius to the method.
circle=>area( radius ).
In a class CIRCLE, u are calling the method AREA passing the radius as variable.
Sri
‎2007 Sep 27 5:52 PM
Hi,
It is a <b>Class Component Selector</b>.
The label <b>class=>comp</b> can be used to access a static component comp of a class without an instance of the class having to be created. The character => is the class component selector. The label class of a class must be to the left of the class component selector. The name comp of the component must be to the right of the object component selector.
The class component selector can also be used to access the data types and constants of an interface.
ifac=>type, ifac=>const
The label ifac of an interface must be to the left of the class component sector. The name type of a data type defined with TYPES or a constant defined with CONSTANTS must be to the right of the object component selector.
<b>Note</b>
It is also possible to access the static components of a class using the object component selector if an instance of the class was created.
<b>Example</b>
Declaration of a class factory and access to its static attribute oref.
CLASS factory DEFINITION CREATE PRIVATE.
PUBLIC SECTION.
CLASS-DATA oref TYPE REF TO factory.
CLASS-METHODS class_constructor.
METHODS do_something.
ENDCLASS.
CLASS factory IMPLEMENTATION.
METHOD class_constructor.
CREATE OBJECT oref.
ENDMETHOD.
METHOD do_something.
...
ENDMETHOD.
ENDCLASS.
...
factory=>oref->do_something( ).
Regards,
Padmam.