Save output from Prolog execution -


i running tool in prolog, , after execute it, result appear on screen, inside prolog shell. how can copy result file?

you never said prolog interpreter you're using. code works edinburgh-compatible version of prolog, swi-prolog (on fedora) in case.

if have file hello.pl:

 hello_world :- write('hello world!'). 

then

consult('hello'). qsave_program(hello,[stand_alone(true),goal(hello_world)]). 

quit interpreter , in shell:

$chmod +x hello ./hello > output_file 

it doesn't return shell when it's done, need find way check whether or not program finished execution , ctrl-d , check output_file hope helps


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -