→Character string literal
according to →IEC-standard: →literal that directly represents a character or →character string value of data type CHAR
, WCHAR
, STRING
or WSTRING
Currently, WCHAR
and WSTRING
not supported in Neuron Power Engineer.
Examples for character string literals: Single-byte character strings consist of zero or more characters prefixed and terminated by the single quote character '
.
In contrast, Neuron Power Engineer does not support double-byte character strings enclosed in the double quote character " for character string literals.
Single-byte character strings are:
Description |
Examples |
---|---|
|
|
typed |
|
|
|
typed |
|
Three-character combination of the dollar sign ($
) followed by two hexadecimal digits are interpreted in Neuron Power Engineer 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 Neuron Power Engineer (e.g. in the 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 |
|
string with line feed |
|
string with newline |
|
string with form feed (page) |
|
string with carriage return |
|
string with tabulator |