Subject: More on escape sequences

From: Luis Iraola Moreno <[email-masked]>
Date: Fri, 11 Feb 2000 13:57:19 +0000 (WET DST)

Hello again,

For writing atoms and strings using escape sequences I have tried write/2
with the options [quoted=true, character_escapes=true].

Everything works fine for atoms:

?- write('a''b
c', [quoted=true, character_escapes=true]).

'a\'b\nc'

yes.

But the same goal with a string does not insert the appropriate escape
sequences:

?- write("a""b
c", [quoted=true, character_escapes=true]).

"a""b
c"

yes.

(I was expecting "a\"b\nc" instead).

It seems like escape sequences work well for atoms (when reading,
concatenating and writing) but not so well (just reading) for strings.

Best regards,

Luis.