Correction: Strange Error in Mozart 1.2.5 Upon Usage of '!'
Operator
Benjamin L. Russell
dekudekuplex at yahoo.com
Sat Nov 19 04:54:36 CET 2005
Okay, that makes sense. It must be a bug in the
online Tutorial. I'll probably report it to the
author as soon as I get an opportunity.
The author probably meant to express the following
code snippet, instead (the locations of the Y and !Y
variables in the "local" block have been transposed):
----- code begins immediately after this line -----
local
Y = 1
in
local
M = f(M !Y)
[X1 Y] = L
L = [1 2]
in
{Browse [M L]}
end
end
----- code ends immediately before this line -----
Running this code snippet generates the following
output in the Oz browser (assuming Minimal Graph
representation mode):
----- output follows immediately after this line -----
[R1=f(R1 2) [1 2]
----- output ends immediately before this line -----
Thank you.
-- Benjamin L. Russell
--- Maximilian Wilson <wilson.max at gmail.com> wrote:
> On 11/18/05, Benjamin L. Russell
> <dekudekuplex at yahoo.com> wrote:
> > ----- code begins immediately after this line
> -----
> > local
> > Y = 1
> > in
> > local
> > M = f(M Y)
> > [X1 !Y] = L
> > L = [1 2]
> > in
> > {Browse [M L]}
> > end
> > end
> > ----- code ends immediately before this line -----
>
> [X1 !Y] = L asserts that there is a new variable X1
> such that [X1 Y] =
> [1 2], where Y is the original variable Y (!
> prevents variable
> creation, of course). Thus it is equivalent to [X1
> 1] = [1 2]. This
> implies that X1 = 1 and 1 = 2, which is of course
> impossible.
>
> I haven't done that tutorial so I don't know why it
> would be
> instructing you to do this.
>
> Max Wilson
>
> --
> Be pretty if you are,
> Be witty if you can,
> But be cheerful if it kills you.
>
More information about the mozart-hackers
mailing list