Quotation+Marks

Quotation Marks
To display quotation marks in Liberty BASIC 4.x, you had to use CHR$(34). A print statement looks like this:

print chr$(34) + "This appears within quotation marks." + chr$(34)

The output in the mainwin looks like this:

//"This appears within quotation marks." //

Run BASIC provides an easier way to display quotation marks. To display a quotation mark, type two quotation marks next to one another. The first example below uses three quotation marks at both the beginning and the end of the string. The first and last quotation marks enclose the text. The pairs of quotation marks within the outer set tells Run BASIC to print a quotation mark character.

The second example below causes just the word "No!" to appear in quotation marks, by surrounding it with pairs of quotation marks.

code format="vbnet" print """This appears within quotation marks.""" print "He said, ""No!"" in a forceful manner." code

Output from the code looks like this:

"This appears within quotation marks." He said, "No!" in a forceful manner.