→Pragma

according to →IEC-standard: language construct for the inclusion of text in a →program organization unit which may affect the preparation of the →program for execution

The specification of the description or comment for a →variable are an example of a pragma (see "Defining description, comment, JSON string or type for variables or data types").

Examples for character string literals within pragmas

Character string literals in pragmas consist of zero or more characters prefixed and terminated by the single quote character ' or by the double quote character ".

Description

Examples

literal with single quote

'' (empty literal), 'OK', 'ABCDEF', 'B', ' ' (only a blank within the literal)

literal with double quote

"" (empty literal), "OK", "ABCDEF", "B", " " (only a blank within the literal)

You are able to directly enter special characters, such as umlauts or €, but $ excepted, within the literal in ' as well as in ".
As alternative, you are able to enter the special characters as a three-character combination of the dollar sign ($) followed by two hexadecimal digits. This is analogous to the input within character string literals.

Examples:

  • Instead of "Änderung" or 'Änderung', you are able to enter "$C4nderung" or '$C4nderung'.

  • Instead of "€300" or '€300', you are able to enter "$80300" or '$80300'.

See the glossary article "→Character string literal" for more examples on these combinations and informative links.

Moreover, the following specifications are possible for character string literals in pragmas:

Specification

Meaning

Example

'$''

in ': literal with single quote character '

'This is $'just$' a test.'

'$"'

in ': literal with double quote character "

'This is $"just$" a test.'

'"'

in ': literal with double quote character "

'This is "just" a test.'

"'"

in ": literal with single quote character '

"This is 'just' a test."

""""

in ": literal with double quote character "

"This is ""just"" a test."

"$""

in ": literal with double quote character "

"This is $"just$" a test."

"$'"

in ": literal with single quote character '

"This is $'just$' a test."

Moreover, the following specifications are possible for character string literals in ' as well as in ":

Specification

Meaning

$$

literal with dollar sign $

$L or $l

literal with line feed

$N or $n

literal with newline

$P or $p

literal with form feed (page)

$R or $r

literal with carriage return

$T or $t

literal with tabulator

$0A

literal as a three-character combination of the dollar sign ($) followed by two hexadecimal digit (e.g. for special characters – as mentioned above)