09-05-2008 10:08 AM
Hi
I have coded like this to create an object based on the class definition.
data : instantiation_1 type ref to counter,
instantiation_2 type ref to counter,
instantiation_3 type ref to counter,
instantiation_tab type table of ref to counter.
create object : instantiation_1,
instantiation_2,
instantiation_3.
append : instantiation_1 to instantiation_tab,
instantiation_2 to instantiation_tab,
instantiation_3 to instantiation_tab.
And when i see it in the debugger i am getting the values like this under instantiation tab
{O:3*\PROGRAM=YHPAP004_TEST\CLASS=COUNTER}
{O:5*\PROGRAM=YHPAP004_TEST\CLASS=COUNTER}
{O:6*\PROGRAM=YHPAP004_TEST\CLASS=COUNTER}
Can any one please explain me how to understand over the above values??
Thanks
09-07-2008 3:46 PM
Hello Arun
The most important thing about your observation is that you can individual instances of the same program object (here: your class) within the same application. This is not possible with e.g. function groups. Or to put it into other words: You can have only a single "instance" of a function group (and its modules) within the same application.
Regards
Uwe
09-05-2008 12:10 PM
What is that you want to understand here ??
Note : When we create an instance of the object - In program we can use it like variables, but in the memory it acts like a object that encapsulates all attributes and its method...
It is like a memory area... so In debugging what you see is just like some kind of address of that memory area (not exactly memory address... but its hard to put in words... )...
If you double click on that... you can see the attributes of that object and their values..
What else you want to understand ?
09-05-2008 12:15 PM
For objects that are accessed through reference (object instances, data references etc), the debugger shows contents as u have shown
The class instances are represented by
where
O specifies that it is a object (class instance)
n is the internal identification number
class_name specifies the name of the class. (for local classes, program name is also listed.)
~Piyush Patil
09-07-2008 3:46 PM
Hello Arun
The most important thing about your observation is that you can individual instances of the same program object (here: your class) within the same application. This is not possible with e.g. function groups. Or to put it into other words: You can have only a single "instance" of a function group (and its modules) within the same application.
Regards
Uwe