Bugs in writeq.

Barry Dwyer <[email protected]>
Newsgroups gmane.comp.gnu.prolog.bugs
Message-ID <[email protected]>
Mac OSX or Unix 10.2.6 GNU Prolog 1.2.16
I have been attempt to write code that generates Prolog source.
writeq is supposed to produce output that can be read by read_term, but 
several strings are unreadable, e.g.,
| ?- writeq('\\+').
\+
| ?- writeq('/*').
/*
The first will cause an exception due to an illegal escape character.  
The second will be treated as a comment, even though it is supposed to 
be a quoted atom.
Even when the program compensates, if the resulting file is consulted, 
an apparent internal use of writeq causes consult to raise an exception.

state(['.',' ','*/'],37).

/users/cs/dwyer/kr> less /var/tmp/gplcCAAHhaij2

clause(state('.'('.','.'(' ','.'(*/,[]))),37),[
     get_list(0),
     unify_atom('.'),



Dr Barry Dwyer
Department of Computer Science
University of Adelaide
Adelaide, South Australia, 5005
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.