On Fri, Oct 24, 2008 at 9:48 AM, vammeer sounrf <[EMAIL PROTECTED]> wrote: > Thanks for explanation . Though i am little disappointed that book/ch2 does > not > explain the mechanism or the meaning of match in context of case. > It is not clear exactly how does the match in case works. > > It seems in a naive way that in "case <x> of <z> .." it tries to bind > <x> to <z> and if it does successfully then the match occurs otherwise > not. > > Also it is clear that the "case <x> of <z> .." is not equivalent to > "if <x>==<z> .."
A question you may ask yourself to make it more clear: Can Oz bind the atom a to atom b? They *are* atoms, so one cannot be bound to the other successfuly, thus the pattern does not match. Of course if one of them was an unbound variable such as... B, yes a capital letter indicating it is a variable (similar to capital X) then B would be unified with, or bound to a, but we're talking about 'a's and 'b's in your example. What you say above is perfectly valid I believe and poses no problems in order to interpret the situation correctly. I hope this explanation helps your understanding (and I hope I didn't do any important error! :) -- Emre Sevinc Lecturer @ Istanbul Bilgi University Computer Science Department Coordinator @ IBM Center for Advanced Studies Lab. http://cs.bilgi.edu.tr/~emres/ http://cs.bilgi.edu.tr http://cas.bilgi.edu.tr/cms/ _________________________________________________________________________________ mozart-users mailing list [email protected] http://www.mozart-oz.org/mailman/listinfo/mozart-users
