Problem with phrase/3: help examples not working

Francisco José Gallego Durán <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <CAOptvQfzzCN3s6EYt63R0X-6jAGKPP-zPON9uMuySACpiAfCzg@mail.gmail.com>
Hi everyone,

   I am pretty new to this list, but I have been playing with prolog for
several years and using Swi-Prolog quite a lot. (I implemented a game
called PLMan<http://plman.i3a.ua.es/downloads/category/1-game?download=1%3Aplman>that
we use to teach logic and prolog programming to our students at the
University of Alicante).

   I have a machine with Arch Linux and SWI 6.2.6 32bits multithreaded, and
looked at help(phrase) to find this example:

*    | ?- phrase(integer(X), "42 times", Rest).                           |*
*    | X = 42                                                             |*
*    ||Rest_=_[32,_116,_105,_109,_101,_115]____*


   I copied it down to the interpreter and got this answer:

*?- phrase(integer(X), "42 times", Rest).*
*ERROR: phrase/3: Undefined procedure: integer/3*
*ERROR:   However, there are definitions for:*
*ERROR:         integer/1*
*   Exception: (7) integer(_G550, [52, 50, 32, 116, 105, 109, 101, 115],
_G578) ? *


   Did I do something wrong, or is it just an outdated-help case?

   I take this opportunity to thank Jan for his work in creating and
maintaining SWI-Prolog. We have been using it for years and it has worked
flawlessly :).

Cheers,
Fran.

----------------------------------------------------------------------------------------
*Francisco José Gallego Durán*
Dpto. de Ciencia de la Computación e Inteligencia Artificial // Universidad
de Alicante
(+34) 965903400 (Ext. 2073)
----------------------------------------------------------------------------------------
-------------- next part --------------
HTML attachment scrubbed and removed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.