Works fine on OS 10.5 Moz/Oz 1.4

Are you sure you just haven't missed the

{Browse {MaxOfThree 10 5 7}}

What error do you get?

-jh


On Apr 14, 2009, at 7:08 AM, Roger Mason wrote:


Hello,

I'm trying mozart for the first time. When I send the following to the
compiler, some work, some don't:

{Browse 'Hello World!'}
works.

fun {Max X Y}
  if X>Y then X
  else Y
  end
end

{Browse {Max 3 5}}
works.

fun {MaxOfThree X Y Z}
  {Max X {Max Y Z}}
end

Fails:

%********************* binding analysis error *******************
%**
%** variable MaxOfThree not introduced
%**
%** in file "Oz", line 11, column 5
%** ------------------ rejected (1 error)

I got the two functions from
http://www.ling.gu.se/~lager/kurser/ExploringOz/Exercises/Solutions/maxOfThree.htm .

I have no clue what I'm doing wrong.

Thanks for any help,

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

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

Reply via email to