For Programmers: Free Programming Magazines  


Home > Archive > Prolog > October 2004 > swi read/1 problem









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author swi read/1 problem
Steve

2004-10-26, 3:58 pm

I have a pl file:

main :-
repeat,
write('> '),
read(X),
(X==quit->true;fail).

Which, if I run from the SWI-Prolog Editor, I get the following error:

17 ?- main.
> test.

ERROR: Stream user_input:2:330 Syntax error: Operator expected
18 ?-

However, if I run from SWI-Prolog, separate from the editor, it works
perfectly. Is there a bug with the editor, or am I doing something
wrong.

Thanks
Steve
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com