On Sat, May 23, 2015 at 3:24 AM, Mike Cowlishaw <[email protected]> wrote:

>
> ::method init
>   USE LOCAL x y z
>
> The variable list should be optional to specify that everything is an
> object variable.
>
> ::method init
>   use local       -- everything is an object variable.
>
>
>> Slightly concerned about this ..  as one drops z then y all works as
>> expected.  Then drop x from the list, too, and a whole new world happens.
>> I'd expect the statement to be a no-op at that point.
>>
>
> I think you are confused about what USE LOCAL with no variable list does.
> Dropping the last last variable only makes that single variable an object
> variable, not suddenly changing the whole world.  The listed variable are
> just a list of variable you wish to be considered local variables in the
> given method context.
>
> I thought the proposal was that 'USE LOCAL' with no variables would make
> all variables be local -- possibly misunderstood.
>
> That is the default situation for a method unless an EXPOSE is used.
Basically, all variables are local unless identified as object scope on the
EXPOSE instruction.  USE LOCAL is intended to give you the opposite
situation where all variables are of object scope unless explicitly
identified as local.  I've found this particularly desirable in INIT
methods where all of the object variables for an instance need to be
initialized.  If the object is a fairly complex one, you end up with a
giant EXPOSE statement at the beginning to identify each variable to be
initialized.

Rick





>
> Mike
>
>
>
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
> _______________________________________________
> Oorexx-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/oorexx-devel
>
>
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Oorexx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to