When a dollar sign ($) is in a string literal, the following two characters are interpreted as a hexadecimal code according to the coding in ISO/IEC 8859-1. The code also corresponds to ASCII code. In addition, note the special cases and control characters.
String with $ Code |
Interpretation |
---|---|
|
8-bit code: Two-digit hexadecimal number that is interpreted according to ISO/IEC 8859-1 |
|
|
|
|
|
|
|
Control character: Line break (corresponds to '$R') |
|
Control character: New line (corresponds to '$L' and '$N') |
String with $ code |
Interpretation |
---|---|
|
Control character: Line feed (corresponds to |
|
Control character: New line (corresponds to |
|
Control character: Form feed |
|
Control character: Line break (corresponds to |
|
Control character: Tab |
|
Dollar sign: |
|
Single straight quotation mark: |
Constant declaration
VAR CONSTANT constA : STRING := 'Hello Allgäu'; constB : STRING := 'Hello Allgäu $21'; // Hello Allgaeu! END_VAR