*
@ is apparently unknown!
It is loaded by the 'rc' file in the SWI home dir and realizes the XPCE binding. I should load this by hand, using:
consult( swi( 'plwin.rc' ) )
All my pl and xpce source files were compiled successfully.
I am interfacing C++ and Prolog to connect a cognitive...
Upon loading into a C++ program a Prolog program that contains the command 'send' (xpce graphics), I get error messages of type:
Syntax Error: Operator Expected.
Here is an example command that causes the errors:
send( Dialog, append, button(continue, message(@prolog...
Here is a simpler version of my problem, if someone could please help me:
I would like to work out a number's factorial. My factorial rule is in a Prolog file and I am connecting it to a C++ file. Can someone please tell me what is wrong with my interfacing C++ to Prolog?
my factorial.pl...
I would like to work out a number's factorial. My factorial rule is in a Prolog file and I am connecting it to a C++ code. Can someone tell me what is wrong with my C++ interface please?
% factorial.pl
factorial( 1, 1 ):-
!.
factorial( X, Fac ):-
X > 1...
Here is my code in its entirety; in response to my own posting (Avoiding plld in VS2008).
Trying "listing." at the Prolog prompt that pops up when I run the program confirms that my Prolog source code has been loaded (consulted).
#include <iostream>
#include <fstream>...
Thanks for the reply Joel.
What I mean is that how can I consult (compile) my Prolog program from within VS2008 C++ code without having to use plld.exe?
Normally, when I write a C++ program to call Prolog and vice versa, and I press F5 to build and compile it, my Prolog code doesn't get...
Hello,
I have a large Prolog program with lots of predicates. I need to connect to this Prolog code from C++ (VS2008) to obtain certain query results.
So I am NOT trying to embed Prolog in C++ as a logical engine, but for my C++ program to connect to my Prolog code and obtain query...
I have a simple Prolog source code (Hanoi.pl) containing the code for solving the Hanoi Towers puzzle:
hanoi( N ):-
move( N, left, middle, right ).
move( 0, _, _, _ ):-
!.
move( N, A, B, C ):-
M is N-1,
move( M, A, C, B ),
inform( A, B ),
move( M, C, B, A ).
inform( X...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.