From amd@atlas.ucpel.tche.br Thu May 10 15:55:52 2001
Received: from atlas.ucpel.tche.br (IDENT:root@atlas.ucpel.tche.br [200.17.82.34])
	by swi.psy.uva.nl (8.11.2/8.11.2) with ESMTP id f4ADtf310639
	for <prolog@swi.psy.uva.nl>; Thu, 10 May 2001 15:55:42 +0200 (MET DST)
Received: from localhost (amd@localhost)
	by atlas.ucpel.tche.br (8.11.1/8.9.3) with ESMTP id f4ADtON17689
	for <prolog@swi.psy.uva.nl>; Thu, 10 May 2001 10:55:25 -0300
Date: Thu, 10 May 2001 10:55:24 -0300 (EST)
From: Aurelio Magalhaes Dias <amd@atlas.ucpel.tche.br>
To: prolog@swi.psy.uva.nl
Message-ID: <Pine.LNX.4.21.0105101047190.15431-100000@atlas.ucpel.tche.br>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from QUOTED-PRINTABLE to 8bit by swi.psy.uva.nl id f4ADtf310639
Subject: [SWIPL] Can someone help me?

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
--------------------------------------

