→Character string literal
according to →IEC-standard: →literal that directly represents a character or →character string value of data type CHAR, WCHAR, STRING or WSTRINGCurrently, WCHAR and WSTRING not supported in logi.CAD 3.
Single-byte character strings consist of zero or more characters prefixed and terminated by the single quote character '.
In contrast, logi.CAD 3 does not support double-byte character strings enclosed in the double quote character " for character string literals.
Single-byte character strings are:
Description |
Examples |
STRING literal |
'OK', 'ABCDEF' |
typed STRING literal |
STRING#'OK', STRING#'ABCDEF' |
CHAR literal |
'B', 'T' |
typed CHAR literal |
CHAR#'B', CHAR#'T' |
Three-character combination of the dollar sign ($) followed by two hexadecimal digits are interpreted in logi.CAD 3 as the corresponding character of the ANSI C character set.
This enables you to enter special characters, such as umlauts, for single-byte character string. Currently, such special characters are displayed in logi.CAD 3 (e.g. in the der Values of Variable view) as they have been entered.
Here a selection of special characters (a list of special characters and the corresponding hexadecimal digits is listed under https://www.ascii-code.com/):
Decimal value |
Hexadecimal digit |
To enter |
Special character |
128 |
80 |
$80 |
€ |
163 |
A3 |
$A3 |
£ |
169 |
A9 |
$A9 |
© |
174 |
AE |
$AE |
® |
177 |
B1 |
$B1 |
± |
178 |
B2 |
$B2 |
² (superscript "2") |
179 |
B3 |
$B3 |
³ (superscript "3") |
188 |
BC |
$BC |
¼ |
189 |
BD |
$BD |
½ |
190 |
BE |
$BE |
¾ |
196 |
C4 |
$C4 |
Ä |
214 |
D6 |
$D6 |
Ö |
220 |
DC |
$DC |
Ü |
223 |
DF |
$DF |
ß |
228 |
E4 |
$E4 |
ä |
246 |
F6 |
$F6 |
ö |
252 |
FC |
$FC |
ü |
If the character combination '$00' is assigned to a single character of a STRING variable, the character string of the STRING variable is terminated at this position. Such character strings are terminated in case of $00 in the Values of Variables view as well.
However, the complete character string is copied in assignments. This makes it possible to have the Values of Variables view display single characters behind $00, if you access the assigned characters behind $00.
Moreover, the following specifications are possible for single-byte character strings:
Specification |
Meaning |
'' |
empty string |
' ' |
string with space character |
'$'' |
string with single quote character ' |
'"' |
string with double quote character " |
Moreover, the following specifications are possible for two-character combinations in single-byte character strings:
Specification |
Meaning |
$' |
string with single quote character ' |
$$ |
string with dollar sign $ |
$L oder $l |
string with line feed |
$N oder $n |
string with newline |
$P oder $p |
string with form feed (page) |
$R oder $r |
string with carriage return |
$T oder $t |
string with tabulator |