Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Simple variables

&pagelevel(5)&pagelevel

Simple variables are uniquely named data objects that are assigned a value and whose value can be changed. They are addressed by means of a variable name. Simple variables do not contain variable elements.

Variable elements that are not themselves complex variables are also called simple variables.

Declaring simple variables

Simple variables that are not variable elements can be declared as follows:

  • implicitly, the first time a value is assigned with the SET-VARIABLE command, provided that implicit declaration is allowed;

  • explicitly, using the command DECLARE-VARIABLE ... TYPE = *ANY / *INTEGER / *BOOLEAN / *STRING, MULTIPLE-ELEMENTS = *NO

The way in which simple variables that are variable elements are declared depends on whether they are elements of a list, an array or a structure:

  • Elements of lists are created either implicitly at declaration time of later by dynamic extension of the list. They can be addressed by a name, which is determined for each element by its position in the list.

  • Elements of arrays can also be created implicitly when the array is declared or later on when the array is dynamically extended. They can be addressed by means of a separate name that is already preset when the array is declared (see "Complex variables ").

  • Elements of structures can be declared implicitly if this was determined when the structure was declared. However, they can also be declared explicitly (see "Complex variables ").