Can anybody help us launch an external application in the manner outlined
below. The problem we have is that if we type commands into the interpreter
shell they work, but if the same commands are in a program we get an error.
Interpreter Shell:
?- library(popstring).
yes
?- prolog_eval(sysobey(popstring 'ls')).
database.pl hierarchy.pl utils.pl
database_rules.pl hierarchy_rules.pl
yes
Program Code:
library(popstring).
launch:-
prolog_eval(sysobey(popstring 'ls')).
Trace:
?- reconsult(system).
;;; PROLOG SYNTAX ERROR - OPERATOR, ',', OR ')' EXPECTED
;;; FOUND : .
;;; READING: library ( consstring ( 41 , 1 ) <<HERE>> .
;;; FILE : /home/sean/pop/proto/system.pl LINE NUMBER: 11
Thanks
Sean & Frank
|