What is the escape char for strings?
BlitzMax Forums/BlitzMax Beginners Area/What is the escape char for strings?
| ||
Hiya, I want to put " in a string but don't know the escape character to put before it. I tried doubling up the quotes (CSV Style) but this doesn't work: Text[0] = """test""" I just get: Compile Error: Expression of type 'String' cannot be invoked Any ideas? Thanks. |
| ||
tilde ~ |
| ||
Thanks dude. |
| ||
Actually I still can't get it to compile: Text[0] = "~"test" gives Compile Error: Bad escape sequence in string. So do I need a hex number after ~ for the " char? |
| ||
Text[0] = "~qtest~q" |
| ||
Sorry, I forgot that you needed to use a q instead of the quotation marks. Documentation on all (at least I don't know of any more personally) the escape sequences can be found in Language->Literals. |
| ||
Thanks guys, yeah I'm sure it was in the docs somewhere, but where to look evaded me! |