bug-prolog
[Top][All Lists]
Advanced

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

Is GNU Prolog interpreter output missing quotes for '<>', '[]', and '{}'


From: Dave Sworin
Subject: Is GNU Prolog interpreter output missing quotes for '<>', '[]', and '{}'?
Date: Thu, 26 Jan 2012 21:45:15 -0800 (PST)

In gprolog 1.3.1 and gprolog 1.4.0 the following occurs.
 
A = '[]'.[ENTER KEY PRESSED]
A = []
 
The same is true for '{}' and '<>'.  However, '()' works as I expected.
 
If a term includes the atom '[]', the term displays an empty list instead of an atom.
 
A = f(abc,1.25,'[]').[ENTER KEY PRESSED]
A = f(abc,1.25,[])
 
So the term now contains an empty list.
 
This seems so very minor but when I copy GNU Prolog output
from the interpreter display and paste it back into the interpreter
for another query, the term is incorrect and the query fails.
 
I encountered this when writing code which outputs some Prolog source code
as in a small code generator for a repetitive task.
 
Is this a bug???
 
Dave

reply via email to

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