Buffer
- Aktualisiert2025-10-31
- 1 Minute(n) Lesezeit
Use the buffer data type to store text and numeric values together.
In addition, the buffer data type can extract specific segments from the buffer, such as numbers and text.
Definition Options
Define PAscript variables with the buffer data type as a local or global variable.
Global Buffer Variables
To define a global buffer variable in PAscript, use the buffer + identifier data types in a section globals code block.
Example: Global Variable Definition
program
section globals
buffer t
endsection
...
endprogram
Local Buffer Variables
To define local buffer variables, specify the buffer data type. Specify the maximum length of the variable in parentheses.
buffer identifier(length) = initialization
Initializing after the identifier is optional. If you do not specify initialization, the variable is initializes with the empty string "".
Example: Local Variable Definitions
program buffer t(10) /* The content of the variable is "" */ buffert1(15) = "Hello" /* corresponds to Hello) */ endprogram
Buffer as Parameter of a User-Defined Function
If you use the buffer data type as a parameter of a user-defined function, only the data type is used. No maximum text length is specified.