Showing results for 
Search instead for 
Did you mean: 

Why using self instead of ?


Hi community, 


i have a short question. What is my advantage when i´m using self.~ instead of ? in a method? I have read the description in the Bangsow book and in the inprogramm help of PS as well but i don´t know different yet. Maybe someone could explain me the differences between these two with a short example. 


Many thanks in advance


Re: Why using self instead of ?

Siemens Phenom Siemens Phenom
Siemens Phenom

If the Method is an exit control, it makes no difference. But in many other cases does.


?  is the caller, self.~ is the location of a user-defined method attribute. Let's say the exit control Station1.A  calls another Method Station2.B. Then in Station2.B  the expression self.~ would refer to the location Station2, and the expression ? would refer to the caller Station1.

Did you like the answer? Then click the Thumbs Up button.
Did the answer solve your problem? Then accept the answer as solution.

Re: Why using self instead of ?


Hi MichaelJoos,


got it, many thanks for your description. 


 Best regards