Message: 7
Date: Mon, 28 Nov 2005 09:06:20 +0100
From: Raphael Collet <[EMAIL PROTECTED]>
Subject: Re: Oz Newbie: Access to Outer Scope Variable
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Raph,

> > Anthony Borla wrote:
> > Do you happen to know whether it is possible to access
> > an 'outer-scoped' variable that is hidden by an inner-scoped
> > one having the same name ? It's certainly easy enough to
> > change the inner variable name, but I was hoping to
> > avoid this.
> >
>
> There's no magic, you need a different identifier.  You can
> always declare an extra variable for that purpose only.  The
> second variable will be like a synonym of the first one.
>
>    local X OuterX=X in   % OuterX is the same as X
>       ...
>       local X in         % inner declaration
>          ...
>          ...             % use OuterX here
>       end
>       ...
>    end
>

Yes, that clears things up.

My thanks to both you, and to Kari, for helping to answer this query.

Cheers,

Anthony Borla


_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to