Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Label for Operands

Former Member
0 Likes
351

Hi,

Label for Operands

Operands can be elementary or made up of components. Composite operands are:

1.Instances of classes (objects) [ref->comp]

2.Classes [class=>comp ]

3.Interfaces [intf~comp])

Please can anyone explain me in a simple words.

Thanks,

Medha.

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
328

All this is saying is that when you are calling a method or referencing an attribute of an instance of a class, you should use -> So say that the class LCL_APP has a instance method called 'TEST_THIS' and an instance attribute called 'THIS_ATTRIBUTE', you can use them like this.

data: o_ref type ref to LCL_APP.

call method o_ref->test_this( ).

* or when referencing the attrbute.

write:/  o_ref->this_attribute.

In the second example, the operand => is used. This is the same as above, but the method or attribute is static and does not have an instance.

The third operance ~ is used to specify the method of the interface which is begin references, works in the same way as above, but when dealing with interfaces.

Regarsd,

Rich Heilman

1 REPLY 1
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
329

All this is saying is that when you are calling a method or referencing an attribute of an instance of a class, you should use -> So say that the class LCL_APP has a instance method called 'TEST_THIS' and an instance attribute called 'THIS_ATTRIBUTE', you can use them like this.

data: o_ref type ref to LCL_APP.

call method o_ref->test_this( ).

* or when referencing the attrbute.

write:/  o_ref->this_attribute.

In the second example, the operand => is used. This is the same as above, but the method or attribute is static and does not have an instance.

The third operance ~ is used to specify the method of the interface which is begin references, works in the same way as above, but when dealing with interfaces.

Regarsd,

Rich Heilman