users-prolog
[Top][All Lists]
Advanced

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

Re: Another point of confusion


From: David Logan
Subject: Re: Another point of confusion
Date: Thu, 6 Jul 2017 09:26:34 -0600

Ah, I should have guessed that. I will figure out how to get Ubuntu to upgrade. What is the latest version?

David Logan


On Jul 6, 2017, at 9:16 AM, Paulo Moura <address@hidden> wrote:

You're looking to the documentation of a recent GNU Prolog version but running an old one.

On 6 Jul 2017, at 16:08, David Logan <address@hidden> wrote:

I am using the manual, and here is the section verbatim:
——————————————————————————————————————————
8.18.4  between/3, for/3

Templates

between(+integer, +integer, ?integer)
for(?integer, +integer, +integer)
Description

between(Lower, Upper, Counter) generates an sequence of backtracking choices instantiating Counter to the values Lower, Lower+1,…, Upper.

for(Counter, Lower, Upper) is equivalent to between(Lower, Upper, Counter). This predicate is deprecated and new code should use between/3.

——————————————————————————————————————————

Here are my results:

address@hidden:~/workspace/prolog/bookworm$ prolog
GNU Prolog 1.3.0
By Daniel Diaz
Copyright (C) 1999-2007 Daniel Diaz
| ?- for(X,0,10), write(X), nl, fail.
0
1
2
3
4
5
6
7
8
9
10

no
| ?- between(0,10,X), write(X), nl, fail.
uncaught exception: error(existence_error(procedure,between/3),top_level/0)
| ?-

Again, what might I be missing here?

Thank you,
David Logan


_______________________________________________
Users-prolog mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/users-prolog

-----------------------------------------------------------------
Paulo Moura
Logtalk developer

Email: <mailto:address@hidden>
Web:   <http://logtalk.org/>
-----------------------------------------------------------------






reply via email to

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