Message: 3
Date: Sun, 27 Nov 2005 11:19:16 +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:
> > According to Section 5.5 of the Oz Docuemntation it is
> > possible to have identically-named variables at different
> > scopes. Access to the outer-scoped variable is possible
> > [in certain contexts] via the '!' operator which
> > 'suppresses' the inner-scoped variable.
> >
> > The following code uses this approach, but it doesn't seem
> > possible to access the outer variable to assign it a value;
> > instead, the program fails [diagnostic given in code comment]:
> >

<SNIP CODE>

>
> Please show me where the 'outer' AVGDEV is declared.
> I looks to me that you are confusing lexical scope with
> cell assignment!
>

I admit to being an Oz newbie, but - thankfully - I know [or at least I
*think* I know] the difference between the two ;) !

I actually posted the complete code, including the AVGDEV declaration, so it
should be in the mailing list archive in its entirety. However, here is some
of the missing code:

   ...
      !AVGDEV = @AVGDEV
    end
  end
  ...

  N AVGDEV
in
  {ComputeStatistics}
  {Application.exit 0}
end

Thanks again.

Cheers,

Anthony Borla


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

Reply via email to