Reputation: 181
How can I run an exe program from my Prolog code and then use the output(which are Prolog predicates) produced by the program in my code?
Specifically, I have been trying to access the output of a program from my code in SWI Prolog in Windows 7 and then use this in my code for further processing.
Any guidelines are greatly appreciated.
Upvotes: 2
Views: 295
Reputation: 5565
To run EXE you can use shell/1
or shell/2
, or win_exec/2
, or win_shell/2
. To read listing of prolog predicates stored in external text file you can use consult/1
.
Upvotes: 2