Menu

#67 is/2 doesn't work when the expression is a variable

wrong answer
closed-wont-fix
nobody
Compiler (23)
5
2004-07-12
2003-02-17
No

If you write the following predicate

succ(In,Out) :-
Expr =.. ['+',1,In],
Out is Expr.

and call ?- succ(1,X). guess what you get?:

X = 1 + 1

weird, heh?

Discussion

  • David S. Warren

    David S. Warren - 2004-07-12

    Logged In: YES
    user_id=13069

    This happens because of the way that expressions in is/2 are
    compiled, and because of a "feature" in an ancient version of
    SBProlog from which XSB is derived. We won't be fixing this
    any time soon. -David

     
  • David S. Warren

    David S. Warren - 2004-07-12
    • status: open --> closed-wont-fix
     

Log in to post a comment.