This project is read-only.
1
Vote

Parsing failure

description

hello(x,(1,2,3)).
hello(y,(1,2,4)).
 
It's not recognized as a valid program

comments

shirjaushii wrote May 9, 2011 at 4:20 PM

If by "(1,2,3)" you mean list, I think you should declare it in square brackets:
hello(x,[1,2,3]).
hello(y,[1,2,4]).

It works.

TheQult wrote Jun 10, 2011 at 5:39 AM

(1,2,3) means a tuple composed by terms: 1, 2 and 3.
Infact on SWI-Prolog:

hello(x,(1,2,3)).

hello(y,(1,2,4)).

?- hello(x,W).
W = (1, 2, 3).

wrote Feb 14, 2013 at 1:42 AM