From ekovach@franuniv.edu Wed Sep 13 22:11:18 2000 Received: from mail.franuniv.edu (root@mail.franuniv.edu [206.244.99.3]) by swi.psy.uva.nl (8.9.3/8.9.3) with ESMTP id WAA05617 for ; Wed, 13 Sep 2000 22:11:09 +0200 (MET DST) Received: from cis78vyz68 ([192.168.32.53]) by mail.franuniv.edu (8.9.3/8.9.3) with SMTP id PAA03637 for ; Wed, 13 Sep 2000 15:30:03 GMT Message-ID: <001101c01dbe$c7c5e1c0$3520a8c0@cis78vyz68.franuniv.edu> From: "Ed Kovach" To: Subject: troubles with SWI -Prolog Date: Wed, 13 Sep 2000 16:10:38 -0400 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_000E_01C01D9D.283F9360" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.3155.0 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3155.0 This is a multi-part message in MIME format. ------=_NextPart_000_000E_01C01D9D.283F9360 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, I'm having some problems getting some list operations to work. The code = is below member1(X, [X | Tail] ). member1(X, [Head | Tail] ) :- member1(X, Tail). conc([ ], L, L). conc( [X | L1], L2, [ X | L3] ) :- conc(L1, L2, L3). add(X, L, [X|L]). del( X, [X | Tail], Tail). del (X, [ Y| Tail ], [ Y | Tail1] ) :- del(X, Tail, Tail1). Member, conc and add work fine. The del does not. When I load the = program using consul, I get an error that there is an operator excepted = in line 12 (the last line.) I don't see anything wrong. I should note = that I did have similar problems with conc. It cleared up after I = corrected an error in member1 (I forgot the ] to close the fist list in = the first clause of member1. Any help would be appreciated. Ed Kovach ekovach@franuniv.edu ------=_NextPart_000_000E_01C01D9D.283F9360 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi,
 
I'm having some problems getting some list = operations to=20 work.  The code is below

member1(X, [X | Tail] ).

member1(X, [Head | Tail] ) :- member1(X, Tail).

conc([ ], L, L).

conc( [X | L1], L2, [ X | L3] ) :- conc(L1, L2, L3).

add(X, L, [X|L]).

del( X, [X | Tail], Tail).

del (X, [ Y| Tail ], [ Y | Tail1] ) :- del(X, Tail, Tail1).

Member, conc and add work fine.  The del does = not. =20 When I load the program using consul, I get an error that there is an = operator=20 excepted in line 12 (the last line.)  I don't see anything = wrong.  I=20 should note that I did have similar problems with conc.  It cleared = up=20 after I corrected an error in member1 (I forgot the ] to close the fist = list in=20 the first clause of member1.

 

Any help would be appreciated.

 

Ed Kovach ekovach@franuniv.edu

 

------=_NextPart_000_000E_01C01D9D.283F9360--