Variables

Variables are values, which can change their meaning during unit execution.

Variables are used in a program to store and process the program data. All variables used in a program will be defined in the variable description section. A variable description section starts with the VAR service word, followed by the description of the variables.

Define a variable name (identifier) and type to describe a variable. A class, interface or enumerable type can be specified as a variable type. A colon is used to separate a name and type. A semicolon is used to end the variable declaration and description. Variables of one type may be listed via a comma before their type definition. The beginning of any other unit block or procedure/function description section means the end of the description block.

A variable may store a specific value or a reference to a value. A variable exists while the block, in which it is defined, is executed.

Format

Var

<identifier>: <type>;

Example

Var

a,b: Integer;

Summa: Double;

See also:

General Information