CodethinkLabs/ofc

Output of Strings With Double Quotes Improperly Escaped

jcburley opened this issue · 1 comments

Given an input program with a statement such as:

write(6,*)'enter something (current "',something,'")'

ofc -s ... produces:

WRITE (6, *) "enter something (current \"", something, "\")"

Note the change from the string being quoted via apostrophes to being quoted by double quotes. ofc seems to recognize the need to quote the double quotes in the output, but it does that by prefixing them with backslash -- a C-ism offered by many Fortran compilers -- rather than the standard-conforming doubling of the double quote (a "quadquote", perhaps?).

I.e. the output should be:

WRITE (6, *) "enter something (current """, something, """)"

You're right of course :) I was looking to be consistent, but we shouldn't do that at the cost of using non-standard features when we don't need to.

Fixed in commit: 82bd047