String

A String literal is a sequence of Unicode characters enclosed within ASCII double-quote characters, or a Unicode left double-quote character (0x201C) and Unicode right double-quote character (0x201D). A string literal is of the String type, and contains zero or more Unicode characters.

Escape Sequence ("" "")

Within a string, an escape sequence of two double-quote characters represents a double quote in the string.

"This is a test String"      result = "This is a test String"
"This is a "test" String"    result = Syntax Error
"This is a ""test"" String"  result = "This is a "test" String"

Insert a new line into a string

There are two ways to insert a new line into a string: the newline() function, and directly entering the newline in the string.

‘Insert a new line using newline() function
printValue("Load = " & stringValue(load11) & "kg." & newline() & "Load is out of range.")
‘Insert a new line directly
printValue("Load = " & stringValue(load12) & "kg.
Load is out of range.")

The first example is the preferred style.