users-prolog
[Top][All Lists]
Advanced

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

Another point of confusion


From: David Logan
Subject: Another point of confusion
Date: Thu, 6 Jul 2017 09:08:10 -0600

I am using the manual, and here is the section verbatim:
——————————————————————————————————————————

8.18.4  between/3for/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 LowerLower+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



reply via email to

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