Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#194 read/1 cannot read back what writeq/1 wrote.

wrong answer
open
nobody
5
2012-03-28
2012-03-28
Ulrich Neumerkel
No

The following term cannot be read back. Please note that this is
independent of actual ISO Prolog conformance.

| ?- V = v(-(1),-((a,b)),-(-),(-)-(-)), writeq(V).
v(-1,-(a ',' b),--,- - -)

Ideally, this term is written as (please note the spaces):

v(- (1),- (a,b),- (-),(-)-(-))

Please refer to http://www.complang.tuwien.ac.at/ulrich/iso-prolog/conformity_assessment#table
for further differences.

Discussion

  • Another case:

    | ?- V = v(- (a;b)), writeq(V).
    v(-(a ';' b))

    Expected:

    v(- (a;b))