-
‘vertical’ Scope of local variables and parameters
Dear $all,
I would like to set up the ‘frame’ of a method $doThings in a super class (here the super table class taSuper), including local variables and parameters, and then specialize it in a sub class, e.g. taInvoices.$doThings, and do part of my calculations in the sub class’es inherited method, and then continue with Do inherited in the super class method.
I was surprised to find that local variables that I defined in the super class method where not inherited down to the sub class method, and manipulations I did on the parameters in the sub class method where not maintained in the super class (e.g. parameter pValue=10 was passed to taInvoices.$doThings(10), then calculated pValue as 5 within the method, and when continuing after Do inherited, pValue was back to the initial pValue=10)
Is this a bug or a feature, or what am I doing wrong or misconceiving?
Thanx in advance!
Uwe
Log in to reply.