Case semantic

Sébastien Doeraene sjrdoeraene at gmail.com
Wed Apr 11 08:18:12 CEST 2012


Hi,

No, the case does not do a unification. Indeed, the argument X of the case
is never modified/bound, even partially. However, non-escaped variable
names in the *pattern* do indeed get bound to the corresponding parts in X
(and these variables only belong to the environment in the "then" part of
the given guard).

Does that answer your question?

Sébastien

On Wed, Apr 11, 2012 at 00:58, Enrique Iurleo <quiquewolf02 at gmail.com>wrote:

> Hi list, i have a doubt about the semantic of case. When i execute a case
> the system does a unification of the variable and pattern? i mean.. for
> example i have:
>
> local X in
>     X=[1 2 3]
>     case X of Y|Yr then {Browse Y} {Browse Yr} else skip end
> end
>
> In this case when the "Browse" is executed browse "1" and "[2 3]".. so the
> environment changes during the case? does the case a unification?
>
> Thanks i hope your answers.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.gforge.info.ucl.ac.be/pipermail/mozart-users/attachments/20120411/7fe39823/attachment.html


More information about the mozart-users mailing list