Text
- Updated2025-04-30
- 2 minute(s) read
Definition Options
Data Type | Global | Local |
---|---|---|
text | ✔ | ✔ |
Global Text Variables
To define a global variable in PAscript, only the data type text plus the variable name are used in the section globals.
Example

Local Text Variables
To define local text variables, the data type text and also the maximum length of the variable must be specified. The length is indicated in parentheses.
text variable name(Length) = initialization
The initialization after the variable name is optional. If no initialization is specified the variable is initialized with the empty string "".
Example

- The maximum length can also be a variable of type int32 for local text variables.
- Non-printable characters can be specified in HEX, for example 0x3 for ETX (End of Text).
Text as Parameter of a User-Defined Function
If data type text is used as a parameter of a user-defined function, only the data type is used. No maximum text length is specified.
Example

Operators
Text can easily be linked using the + operator.
Example

Special Characters
Umlauts and most of the printable special characters can be used in variables of type text without any restrictions. One exception is the backslash \, which serves as an escape character and must be masked for the output in a text with an additional backslash.
Escape Sequence | Output |
---|---|
\n | Change to the next line |
\r | Start with the first character of the current line |
\0 | NULL character |
\\ | Output of the backslash in the text |