Question on == operator 
Author Message
 Question on == operator

Pardon me if this is a question that was beaten to death before.

Both Quintus and SICStus prolog manuals say that +Term1 == +Term2

       Succeeds if the terms currently instantiating Term1 and Term2 are
       literally identical (in particular, variables in equivalent
       positions in the two terms must be identical).

Given this I am unable to comprehend why the query

       | ?- X = f(a,g(b,Y),Z), O = f(a,g(b,Y),Z), X == Y.

fails. My understanding is that X and Y are identical terms with
the variables in equivalent positions in the terms being
identical. Where am I goofing up ? May I request cogniscenti to
kindly clear this up for me ?

Thanks a zillion in advance.

Bharadwaj

-----------------------------------------------------------------------------
S. Bharadwaj Yadavalli,       Dept. of Computer Science,    

Ph: (306)-966-4743(O)         Saskatoon, S7N 0W0 (Canada)
    (306)-653-1176(R)         http://www.*-*-*.com/



Tue, 14 Apr 1998 03:00:00 GMT  
 Question on == operator

[entirely stupid posting about a supposed misbehaviour of ==
  operator deleted]

I am extremely sorry to have been so careless and asked the
question. Please ignore the posting.

Bharadwaj
( almost deciding NEVER to post again - lest my stupidity shows )

-----------------------------------------------------------------------------
S. Bharadwaj Yadavalli,       Dept. of Computer Science,    

Ph: (306)-966-4743(O)         Saskatoon, S7N 0W0 (Canada)
    (306)-653-1176(R)         http://www.cs.usask.ca/grads/sby/



Wed, 15 Apr 1998 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. beginner question: shift operator ?

2. funcall question: special operator is not a function

3. operator overloading and user definable operators.

4. Overloading logical operators and bitwise operators

5. OPERATOR (was: Why no ** operator in Modula2?)

6. Aliases for operators, creating new operators

7. Operator overload of base operator and compiler diagnostic

8. awk's mod operator % question (application: log base2 non-integer result)

9. Newbie question about the ^ operator?

10. Question: CPO's & Fixed Point Operator

11. Operator Overloading question

 

 
Powered by phpBB® Forum Software