I’m not clear with Theo’s tweet about embeded quotes in literal strings.
He says a string like
“He said ““Hi!”””
shoul be displayed like
He said ““Hi!””
instead the way it is dealed with in VB (.NET or classical):
He said “Hi!”
Does it mean in Mercury one should write like this:
“He said “Hi!””
Would it be able to understand that the second quote does not close the first one?
First: This will completely the same in Mercury as it is in VB.
So to get a quote within a string, you should use a double quote - just as it is in VB.
So no, it will not display a double quote
The point is, there are more types of quotes - the standard we use is asci code 34.
But when you type in MS Word, you will see that it will use “smart” quotes.
VB accepts these smart quotes in strings, but when you use them in a string, it will always return the normal (asci 34) quote instead of the character you typed.
This is a bug, and will be fixed in Mercury.