On Sun, Nov 27, 2005 at 04:36:48PM +1100, 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.

That isn't quite right.  This is what reads in there:

> If we want Y to denote the variable in the outer scope, we have to
> suppress the introduction of the inner Y in the L.H.S. of the
> initializing equality by using an exclamation mark ! as follows. An
> exclamation mark ! is only meaningful in the L.H.S. of an initializing
> equality

That is, the effect of using ! is to suppress introducing a new
variable, not to access any variable from an outer scope.

!A will just pick the nearest A it sees, which happens to be the one
in the same inner scope in your code.

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

Reply via email to