Newbie question about 'pce_begin_class'

30 views
Skip to first unread message

dfkettle

unread,
Nov 10, 2014, 2:43:17 PM11/10/14
to swi-p...@googlegroups.com
Hi!

I've just started using SWI-Prolog and XPCE, and I'm going through the tutorial "XPCE/Prolog Course Notes", but when I tried to enter the example in section 3.3.3, I received this error message:

 ?- pce_begin_class(matrix(width, height), vector, "Two-dimensional array").
ERROR: toplevel: Undefined procedure: pce_begin_class/3 (DWIM could not correct goal)

I searched the Wiki page for this error and found this note:

Load XPCE explicitely by starting a file or module that uses it with the load-command:

:- use_module(library(pce)).

However, I had already done that, but I still get the error. What am I doing wrong?

Thanks.

Anne Ogborn

unread,
Nov 10, 2014, 8:13:51 PM11/10/14
to dfkettle, swi-p...@googlegroups.com
Did you type this in at the interactor (the ?- prompt? )

that goes in a file.

Prolog doesn't exactly have a 'repl', it has an 'interactor (also known as a top-level), it's where you enter queries.

Facts and rules go in a file you consult.

Explanation of this:

http://www.pathwayslms.com/swipltuts/student/index.html#not_repl








________________________________
From: dfkettle <dfke...@gmail.com>
To: swi-p...@googlegroups.com
Sent: Monday, November 10, 2014 11:43 AM
Subject: [SWIPL] Newbie question about 'pce_begin_class'
--
You received this message because you are subscribed to the Google Groups "SWI-Prolog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swi-prolog+...@googlegroups.com.
Visit this group at http://groups.google.com/group/swi-prolog.
For more options, visit https://groups.google.com/d/optout.

dfkettle

unread,
Nov 11, 2014, 9:40:08 AM11/11/14
to swi-p...@googlegroups.com, dfke...@gmail.com, anni...@yahoo.com
Thanks, I didn't realize that. It makes sense now.

Reply all
Reply to author
Forward
0 new messages