Launching External Appliations 
Author Message
 Launching External Appliations

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



Mon, 22 Sep 1997 03:00:00 GMT  
 Launching External Appliations

Quote:
> 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


Phone: +44 (0)1273 678367 URL: http://www.cogs.susx.ac.uk/users/adrianh/



Tue, 23 Sep 1997 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. How to launch external application.

2. How to launch an external program from VisualWorks?

3. Launching an external application from IBM Smalltalk.

4. Launch and external visual basic program from a labview executable

5. Need help launching external non rexx command using VXREXX (VIO support needed) in OS/2

6. Problem launching external progs

7. Launching and External Application

8. Please help! - Launch an external program

9. Please help - launch a external program

10. External link errors when using external Catalyst SocketTools Library Edition 2.15 dll

11. How to abort an external program launched via System Exec?

12. Q) launching and controlling an external program [ any Wiki reference ?]

 

 
Powered by phpBB® Forum Software