6 Programming
6-70
NJ-series CPU Unit Software User’s Manual (W501)
Text String Data
*1 You can use this notation in the Sysmac Studio version 1.08 or higher.
Escape Character List
Text Strings
Notation Example Remarks
‘String’ ‘This is a string’ • Enclose the string in single-byte single quotation marks
(‘).
• If you want to insert tabs, line break codes, or other spe-
cial characters, you can use a dollar sign ($) as an escape
character before them. (Refer to the following table.)
• You can also specify a string with 0 characters.
• As in the following example, a building error will occur if
you specify any strings that span across multiple lines.
strVar := 'ABC
DEF'
STRING#' String'
*1
STRING#' This is a
string'
Escape character Name Meaning
$$ Single-byte dollar sign Single-byte dollar sign ($: character code 0x24)
$' Single-byte single quo-
tation mark
Single-byte single quotation mark (‘: character code 0x27)
$L or $l Line feed Moves the cursor to the next line.
LF control character (line feed: character code 0x0A)
$N or $n Vertical tab Moves the cursor to the next line.
NL control character (vertical tab: character code 0x0B)
$P or $p Form feed Moves the cursor to the next page.
FF control character (form feed: character code 0x0C)
$R or $r Carriage return Moves the cursor to the start of the line.
CR control character (carriage return: character code
0x0D)
$T or $t Horizontal tab Indicates a tab.
Tab character (character code 0x09)
$" Single-byte double quo-
tation mark
Outputs a single-byte double quotation mark (character
code 0x22).
$(two-digit hexadeci-
mal number)
Direct character code
specification
Specify the character code as two-digit hexadecimal in
parentheses. Character codes are two-digit hexadecimal
numbers that range from 00 to FF.
For example, “$L” is the same as “$0A”. UTF-8 character
codes cannot be expressed in a single byte. But, for exam-
ple, the character code for the Japanese character ‘ ’ is
0xE38182 which can be represented as ‘$E3$81$82’.