GLBasic forum

Main forum => Bug Reports => Topic started by: MrTAToad on 2012-Feb-17

Title: Backslash in quotes
Post by: MrTAToad on 2012-Feb-17
I have found that having a backslash in quotes (something like "\") greys the rest of the text on the line out, but will compile the code.
Title: Re: Backslash in quotes
Post by: Slydog on 2012-Feb-17
Confirmed!
I assume it's because the backslash starts an escape sequence, so the next character is interpreted differently.
Putting a space (or any character) after works ("\ "), but putting two backslashes doesn't work ("\\").
The IDE isn't seeing the last quote, so draws the remainder of the line in the 'String' colour.
Title: Re: Backslash in quotes
Post by: MrTAToad on 2012-Feb-17
Yes thats - I had expected \\ to solve the problem, but it doesn't  :P
Title: Re: Backslash in quotes
Post by: Kitty Hello on 2012-Feb-20
use char$() then. (22 for quotes?) :D
Title: Re: Backslash in quotes
Post by: Minion on 2012-Feb-20
CHR$(34) for a quote :) and ive been adding a lot of DATA statements with quotes in so the \" has been invaluable too me just lately.