users-prolog
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SOLVED get rid of prolog banner


From: Daniel Diaz
Subject: Re: SOLVED get rid of prolog banner
Date: Tue, 29 Apr 2003 12:39:39 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01

First, why dont you compile your file testProlog instead of consulting it at run-time ?. Since you execute a command (under the shell), you could execute:
   gplc testProlog.pl (to obtain an executable testProlog)
and then simply run:
   testProlog

You can now use a :- initialization/1 directive to launch your goal (tell(result), foo(bar);halt(0)).

If you really need to consult this file, you could manually compile it to byte-code, using:
   gplc -w testProlog.pl (creates testProlog.wbc silently)
and then launch:
   gprolog --init-goal 'load(testProlog),tell(result),foo(bar);halt(0)'

you can even launch the compilation under gprolog using for instance shell/1 (there are other predicates to execute commands).
This gives:

   gprolog --init-goal 'shell('gplc -w testProlog.pl'),load(testProlog),
                        tell(result),foo(bar);halt(0)'

See you

address@hidden wrote:
Hi again,
Eventually, redirecting the output to a result file was possible

address@hidden:~/projet/prolog> gprolog --init-goal
'[testProlog],tell(result),foo(bar);halt(0)'
compiling /home/olivier/projet/prolog/testProlog.pro for byte code...
/home/olivier/projet/prolog/testProlog.pro compiled, 33 lines read - 2837
bytes written, 21 ms

I am not fully satisfied however, and would have prefered to run in silent
mode so that only the result of my query appears in stdout

Thanks to everyone for the assistance
Olivier




--
Ce message a subi une analyse antivirus par MailScanner ; il est vraisemblablement
sans danger.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]