[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Mon Apr 7 14:05:18 1995 
Subject:Re: Launching External Appliations 
From:Adrian John Howard 
Volume-ID:950407.02 

> 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.
[snip]
> 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

It's breaking because you defined the -popstring- macro before loading
"system.pl" (perhaps in your "init.pl"), so:

    library(popstring)

breaks because -popstring- macro starts looking for a Pop-11 string. You
can either:

  o Quote the library name, eg: ?- library('popstring.pl').
  o Make sure you load "system.pl" before the macro is defined.

Adrian

aids (adrianh@cogs.susx.ac.uk)  ObDisclamer: Poplog used to pay my wages
Phone: +44 (0)1273 678367 URL: http://www.cogs.susx.ac.uk/users/adrianh/