
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,
Roberto
P.S. This question arose during the investigation of a more complex problem that is much more difficult to reproduce (and explain :-)
participants (1)
-
Roberto Bagnara