users-prolog
[Top][All Lists]
Advanced

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

Re: int pow on Win32 -- and nth1/3


From: Daniel Diaz
Subject: Re: int pow on Win32 -- and nth1/3
Date: Fri, 09 Dec 2011 14:46:00 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111124 Thunderbird/8.0

Hello,


Daniel

With gprolog-1.4.0-mingw-x86, I observe the following oddity:

  | ?- N is 10^2.
  N = 99
  yes

The problem does not appear on Linux gprolog-1.4.0 (sorry, I didn't have the resources to test the latest build on Win32).

indeed I have reproduced this bug. I think it is due to mingw itself. Seems fixed now with a more recent version.

You can try:

http://gprolog.univ-paris1.fr/unstable/setup-gprolog-1.4.1-msvc-x86.exe


And by the way, gprolog-1.4.0 (both Linux and Win32) seems to have introduced nth1/3 as an (apparently) undocumented "clone" of the nth/3 predicate:

  | ?- nth(2,[a,b,c],X).
  X = b
  yes
  | ?- nth1(2,[a,b,c],X).
  X = b
  yes

This is for backward compatibility reasons. There is also a nth0/3 that counts from 0.

Thank you.

Daniel

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