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
Post a Comment