-------- Original Message -------- Subject: Re: [SWIPL] Unwanted prompt in the output Resent-Date: Mon, 25 Oct 2004 18:23:09 +0200 (CEST) Resent-From: prolog@swi.psy.uva.nl Date: Mon, 25 Oct 2004 17:50:45 +0200 From: Jan Wielemaker <jan@swi.psy.uva.nl> To: SWI Prolog <prolog@swi.psy.uva.nl> References: <417CDAD4.3030303@cs.unipr.it> Roberto, On Mon, Oct 25, 2004 at 12:52:04PM +0200, Roberto Bagnara wrote:
Hi there,
I have question: if I create a file that contains only a blank line (i.e., "\n") and I call it `test' and I do `pl <test >out', the `out' file contains the string "1 ?- | ". Notice that, to avoid ambiguities I am using the C syntax for strings, so by omitting "\n" I imply that the line above is not terminated. However, the problem is the presence of "| ", not the absence of the end-of-line character.
If I modify the `test' file so that it contains two lines, one blank as before followed by one containing "halt.\n" and I do the same thing as before, `out' will then contain "1 ?- ", i.e., without the vertical bar. Is this behavior the intended one? I have tested with several other Prolog systems and they do not seem to make this kind of distinction between EOF on input or an explicit "halt." occurring in it. Cheers,
I'd have to do some tracing and debugging to find the why. Actually I think there should be no prompt (at least by default) if the input is not associated to a terminal. For the moment, I guess using the prompt/2 command to kill the prompt is the most sensible thing to do. Cheers --- Jan ---------------- * To UNSUBSCRIBE, please use the HTML form at http://www.swi-prolog.org/mailinglist.html or send mail to prolog-request@swi.psy.uva.nl using the Subject: "unsubscribe" (without the quotes) and *no* message body. ** An ARCHIVE of this list is maintained at http://www.swi.psy.uva.nl/projects/SWI-Prolog/mailinglist/archive/ -- Prof. Roberto Bagnara Computer Science Group Department of Mathematics, University of Parma, Italy http://www.cs.unipr.it/~bagnara/ mailto:bagnara@cs.unipr.it