Subject: [SWIPL] Can someone help me?

From: Aurelio Magalhaes Dias <[email-masked]>
Date: Thu, 10 May 2001 10:55:24 -0300 (EST)

Hi, if I have a consult like this ...

?- soma([2,4],3).

and this code ...

soma(X,Y):-
	X = [X1,Y1],
	Y = Y2,
	S1 is X1+Y2,
	S2 is Y1+Y2,
	print([S1,S2]).

... why it doens't work giving me the error:

?- soma([2,4],3).
[WARNING: '.'/2: Type error: `[]' expected, found `[4]']
 ^ Exception: (  9) _L123 is[2, 4]+3 ? creep
   Exception: (  8) soma([2, 4], 3) ? creep
[WARNING: Unhandled exception]

Execution Aborted

Can someone give me a hand ?

	Thanks in advance, Aurélio.

--------------------------------------
       Aurélio Magalhães Dias
       Ciência da Computação
       UCpel - RS - Brasil
--------------------------------------