文字列リテラルは、ASCII 二重引用符文字、または Unicode 左二重引用符文字(0x201C)および Unicode 右二重引用符文字(0x201D)に囲まれた Unicode 文字のシーケンスです。文字列リテラルは文字列タイプで、0 以上の Unicode 文字が含まれています。
文字列内で、2 つの二重引用符文字のエスケープ シーケンスは文字列内の二重引用符を示します。
"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"
文字列に新しい行を挿入する方法は 2 つあります。newline()関数と、文字列に直接新しい行を入力することです。
‘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.")
最初の例が推奨されるスタイルです。