bug-prolog
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: nth in latest unstable version


From: Daniel Diaz
Subject: Re: nth in latest unstable version
Date: Fri, 04 Dec 2009 18:10:19 +0100
User-agent: Thunderbird 2.0.0.23 (X11/20090817)

Oups...

fixed (I hope :-)) in last snapshot:
http://gprolog.univ-paris1.fr/unstable/gprolog-20091204.tgz

Daniel


Jasper Taylor a écrit :
nth and nth0 do not work when the position is a number but the list is free. Examples (on Ubuntu but MacOS is same I think):

address@hidden:~$ gprolog
GNU Prolog 1.3.2
By Daniel Diaz
Copyright (C) 1999-2009 Daniel Diaz
| ?- nth(1,B,c).

no
| ?- nth0(0,B,c).

no

Working examples:

| ?- nth(A,B,c).

A = 1
B = [c|_] ? ;

A = 2
B = [_,c|_] ? ;

A = 3
B = [_,_,c|_] ?

yes
| ?- nth0(A,B,c).

A = 0
B = [c|_] ?

yes

Cheers
   --Jasper



_______________________________________________
Bug-prolog mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/bug-prolog



--
Ce message a ete verifie par MailScanner
pour des virus ou des polluriels et rien de
suspect n'a ete trouve.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]