Would you point at bit more directly to where in the tutorial this is covered. 
 
What I have since decided is that pattern matching is not treated as general unification but is treated as an operation that suspends until the material to be matched is instantiated. This would parallel the situation in which other operations suspend until their arguments are instantiated. That makes sense in some cases, but I would prefer pattern matching to be general unification and to work even if the arguments are not instantiated.  Why not use the pattern matching step to instantiate some of the arguments?  That's one of the nice things about Prolog.

 
On 9/25/05, Filip Konvicka <[EMAIL PROTECTED]> wrote:
> In the following program, I'm trying to instantiate an output variable
> in a case statement. I get output for {Browse start}, but I don't get
> any other output.  Any idea why or where it is hanging?

Hi,

>
>         local Test
>            proc {P A B C}
>               {Browse start}
>               case A#B#C of
>           nil#B#B then {Browse first}

here, as Test (aka C) is unbound. You can not do such things with
"case". Read the tutorial carefully.

Cheers,
Filip

>               [] A#nil#A then {Browse second}
>               [] _#_#5 then {Browse neither}
>               end
>               {Browse after}
>            end
>         in
>            {P nil 3 Test}
>            {Browse Test}
>         end
>
>
_________________________________________________________________________________
mozart-users mailing list                               [email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users



--
_____________________________________________
Russ Abbott
Professor, Computer Science
California State University, Los Angeles
o Check out my blog at http://russabbott.blogspot.com/
_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to