Newsgroups: comp.lang.pop
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!news.mathworks.com!zombie.ncsc.mil!news.duke.edu!godot.cc.duq.edu!hudson.lm.com!news.pop.psu.edu!news.cac.psu.edu!howland.reston.ans.net!pipex!warwick!niss!gdt!dcl-cs!sean
From: sean@comp.lancs.ac.uk (Mr S Butler)
Subject: Launching External Appliations
Message-ID: <D6MEM0.322@comp.lancs.ac.uk>
Sender: usenet@comp.lancs.ac.uk (The Guardian)
Nntp-Posting-Host: sinbad
Organization: Computing Department, Lancaster University.
Date: Thu, 6 Apr 1995 15:49:12 GMT
Lines: 33

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
