Hi,
 
I'm now working on Chapter 9 of CTM.  It seems to be inconsistent with the material in Section 12 of the Tutorial (http://www.mozart-oz.org/documentation/tutorial/node12.html#chapter.lp ).  Among other things the tutorial discusses or, dis, etc, (but not choice) whereas CTM discusses only choice.
 
The simple Ints program from the Tutorial works.
 
local
proc {Ints N Xs}
   or N = 0 Xs = nil
    [] Xr in  
      N > 0 = true Xs = N|Xr
      {Ints N-1 Xr}
   end  
end in
   {Browse {Ints 5}}
end
 
So I guess or is defined in the current system. (Why isn't it in CTM?)
 
Then I tried the simple Digit program from CTM
 
local
   fun {Digit}
      choice 0 [] 1 [] 2 [] 3 [] 4 [] 5 [] 6 [] 7 [] 8 [] 9 end
   end
in
   {Browse {Search {Digit}}}
end
 
CTM uses Solve and SolveAll, but I got compiler error messages when I tried either of those.  In the above, I used Search instead.  No compiler errors, but no output. So I suppose choice is defined, but I don't understand why I got no output.  I also got no output when I just tried just {Browse {Digit}}. (I don't understand why not.)
 
Is there anything that explains how the current version of all this works?
 
Thanks.
 
-- Russ Abbott
_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to