Table 5 - Character string literal features
No.
Example
Explanation
1
Single-byte character strings
''
Empty string (length zero)
'A'
String of length one containing the single character A
' '
String of length one containing the “space” character
'$''
String of length one containing the “single quote” character
'"'
String of length one containing the “double quote” character
'$R$L'
String of length two containing CR and LF characters
'$0A'
String of length one containing the LF character
'$$1.00'
String of length five which would print as “$1.00”
'ÄË'
'$C4$CB'
Equivalent strings of length two
2
Double-byte character strings
""
Empty string (length zero)
"A"
String of length one containing the single character A
" "
String of length one containing the “space” character
"'"
String of length one containing the “single quote” character
"$""
String of length one containing the “double quote” character
"$R$L"
String of length two containing CR and LF characters
"$$1.00"
String of length five which would print as “$1.00”
"ÄË"
"$00C4$00CB"
Equivalent strings of length two
3
Single-byte typed string literals
STRING#'OK'
String of length two containing two single-byte characters
4
Double-byte typed string literals
WSTRING#'OK'
String of length two containing two double-byte characters
NOTE If a particular implementation supports feature #4 but not feature #2, the
implementor may specify implementation-dependent syntax and semantics for
the use of the double-quote character.
Copyright International Electrotechnical Commission
Provided by IHS under license with IEC
Not for Resale
No reproduction or networking permitted without license from IHS
--``````-`-`,,`,,`,`,,`---
– 28 –
61131-3
IEC:2003(E)
Do'stlaringiz bilan baham: |