"Jorge M. Pelizzoni" wrote:
>
> Why can't you write
>
> local
> X = 1|2
> in
> {Browse (X = 1|$)}
> end
>
> instead of
>
> local
> X = 1|2
> in
> {Browse local Rslt in X = 1|Rslt Rslt end}
> end
>
> ?
I'll try an explanation...
Because:
1) E1|E2 is syntactic sugar for '|'(E1 E2),
not for a procedure application {'|' E1 E2 $}
2) Nesting markers can only occur at parameter position in
procedure/function definition/application.
(see section 5.1 "The Base Language" in Oz Notation).
Now, assuming E1|E2 translated to {'|' E1 E2 $}, then
E1=1|$ would translate to E1={'|' 1 $ $} which is incorrect
since more than one occurrence of the nesting marker within the
parameter list is not allowed.
What you would would like is E1=E2|E3 where either E2 or E3 is the
nesting
marker $ to be syntactic sugar for sthing like {List.'|' E2 E3 E1}
(and, incidently, List.'|' to not have {List.'|' +X +Ys ?Zs} as
signature,
but rather something like {List.'|' +?X +?Ys +?Zs)).
Regs,
Alain
>
> Thanks in advance,
>
> Jorge.
> -
> Please send submissions to users@mozart-oz.org
> and administriva mail to users-request@mozart-oz.org.
> The Mozart Oz web site is at http://www.mozart-oz.org/.
-
Please send submissions to users@mozart-oz.org
and administriva mail to users-request@mozart-oz.org.
The Mozart Oz web site is at http://www.mozart-oz.org/.