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 <prolog@swi.psy.uva.nl>; 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 <prolog@swi.psy.uva.nl>; Wed, 13 Sep 2000 15:30:03 GMT
Message-ID: <001101c01dbe$c7c5e1c0$3520a8c0@cis78vyz68.franuniv.edu>
From: "Ed Kovach" <ekovach@franuniv.edu>
To: <prolog@swi.psy.uva.nl>
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

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dwindows-1252">
<META content=3D"MSHTML 5.50.4134.600" name=3DGENERATOR></HEAD>
<BODY bgColor=3D#f0e8d8>
<DIV><FONT size=3D2>Hi,</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>I'm having some problems getting some list =
operations to=20
work.&nbsp; The code is below</FONT></DIV>
<DIV><FONT size=3D2><FONT size=3D2>
<P>member1(X, [X | Tail] ).</P>
<P>member1(X, [Head | Tail] ) :- member1(X, Tail).</P>
<P>conc([ ], L, L).</P>
<P>conc( [X | L1], L2, [ X | L3] ) :- conc(L1, L2, L3).</P>
<P>add(X, L, [X|L]).</P>
<P>del( X, [X | Tail], Tail).</P>
<P>del (X, [ Y| Tail ], [ Y | Tail1] ) :- del(X, Tail, Tail1).</P>
<P></P>
<P></FONT>Member, conc&nbsp;and add work fine.&nbsp; The del does =
not.&nbsp;=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.)&nbsp; I don't see anything =
wrong.&nbsp; I=20
should note that I did have similar problems with conc.&nbsp; 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.</P>
<P>&nbsp;</P>
<P>Any help would be appreciated.</P>
<P>&nbsp;</P>
<P>Ed Kovach <A =
href=3D"mailto:ekovach@franuniv.edu">ekovach@franuniv.edu</A></P>
<P>&nbsp;</P></FONT></DIV></BODY></HTML>

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

