Reputation: 13585
Hey guys, this should be quite simple to answer....
Im using XSB Prolog...trying to load a .p prolog database
I have a file xxx.P in directory C:\XSB
So in XSB I type
?consult('xxx.p').
and i get:
cannot find the file or module xxx.p
i've tried moving the p file to the same directory as the XSB executable but no luck. Any ideas?
edit: contents of xxx.p:
has_access(tom,123).
has_access(bob,456).
thanks
Upvotes: 2
Views: 1968
Reputation: 5091
XSB uses the file extension to determine the file type and it only recognizes .P (capital P) and .pl as Prolog files. Name your file with either a .P or .pl extension and consult it that way.
| ?- consult('test.p').
no
| ?- consult('test.P').
[Compiling .\test]
[test compiled, cpu time used: 0.0200 seconds]
[test loaded]
yes
Upvotes: 2
Reputation: 103135
Try using the fully qualified name of the file like this:
?consult('C:\\XSB\\xxx.p').
If I remember correctly you have to escape the backslashes.
Upvotes: 1