String Character Literals
A string character literal is a sequence of zero or more characters prefixed and terminated by the single quote character (‘).The three-character combination of the dollar sign ($) followed by two hexadecimal digits shall be interpreted as the hexadecimal representation of the eight-bit character code.
Two-character combinations beginning with the dollar sign shall be interpreted as shown in the following table when they occur in character strings.
Wide String Character LiteralsA wide string character literal is a sequence of zero or more characters prefixed and ter- minated by the double quote character (“).The three-character combination of the dollar sign ($) followed by two hexadecimal digits shall be interpreted as the hexadecimal representation of the eight-bit character code.
Two-character combinations beginning with the dollar sign shall be interpreted as shown in the following table when they occur in wide character strings.
Example | Explanation |
” | 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. |
Combination | Interpretation when printed |
$$ | Dollar sign |
$’ | Single quote |
$L o $1 | Line feed |
$N o $n | Newline |
$P o $p | Form feed (page) |
$R o $r | Carriage return |
$T o $t | Tab |
Example | Explanation |
” | Empty string (length zero). |
‘A’ | Wide string of length one containing the single character A. |
‘ ‘ | Wide string of length one containing the space character. |
‘$” | Wide string of length one containing the single quote character. |
‘”’ | Wide string of length one containing the double quote character. |
‘$R$L’ | Wide string of length two containing CR and LF characters. |
‘$0A’ | Wide string of length one containing the LF character. |
Combination | Interpretation when printed |
$$ | Dollar sign |
$’ | Single quote |
$L o $1 | Line feed |
$N o $n | Newline |
$P o $p | Form feed (page) |
$R o $r | Carriage return |
$T o $t | Tab |