Closed prologbyexample closed 1 year ago
The behaviour of write/1 and writeln/1 for clauses is different between SWISH and the WASM shell.
write/1
writeln/1
The following runs the same query in both environments.
On SWISH ( https://swish.swi-prolog.org ):
?- B = (H1=H2, same(T1, T2)), H1=a, H2=a, T1=[2,3], T2=[2,3], write(B). a=a,[2, 3],2,3,[]
You can see same is missing.
same
On the WASM shell ( https://dev.swi-prolog.org/wasm/shell ):
?- B = (H1=H2, same(T1, T2)), H1=a, H2=a, T1=[2,3], T2=[2,3], write(B). a=a,same([2,3],[2,3])
Here same is correctly printed, including the brackets ().
()
Also, SWI-Prolog 9.0.2 on macOS appears to work correctly.
This looks like an bug in the normal SWISH, with the WASM version showing the correct behaviour.
Thanks. Fixed. SWISH write/1 does not use Prolog write/1, but a sophisticated translation of the term to HTML. That has a bug. Updated public swish.
The behaviour of
write/1
andwriteln/1
for clauses is different between SWISH and the WASM shell.The following runs the same query in both environments.
On SWISH ( https://swish.swi-prolog.org ):
You can see
same
is missing.On the WASM shell ( https://dev.swi-prolog.org/wasm/shell ):
Here
same
is correctly printed, including the brackets()
.Also, SWI-Prolog 9.0.2 on macOS appears to work correctly.
This looks like an bug in the normal SWISH, with the WASM version showing the correct behaviour.