How can I pass quotation marks to a string?

Started by ErikT, July 17, 2017, 18:47:27

Previous topic - Next topic

ErikT

... like this here:

writeline cfg_xml, "<?xml version="1.0" encoding="UTF-8"?>"

Blitzmax will think I mean to mark the end of the string at "1.0" when I really want those quotation marks to be included in it. There's a way to do this, surely?

TomToad

Anyplace you want a quote, just use ~q
writeline cfg_xml, "<?xml version=~q1.0~q encoding=~qUTF-8~q?>"
------------------------------------------------
8 rabbits equals 1 rabbyte.

ErikT


Rooster

I been wondering that myself.
Thanks TomToad. :)

MikeHart


xlsior

Alternatively,

print "This is a so-called "+chr$(34)+"quote"+chr$(34)