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

jasp...@spacehopper:~$ 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
[email protected]
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.



_______________________________________________
Bug-prolog mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-prolog

Reply via email to