Userdefined Types

Derived Types

TYPE

<typeName>: <typeName> := <defaultValue>;

END_TYPE

Definition of a new type as an alias to an existing type. The default value is optional.

Enumeration Types

TYPE

<typeName> : (<enumValue>, …, <enumValue>) := <defaultValue>;

END_TYPE

Definition of an enumeration type. The default value is optional.

Enumeration Types with Defined Values

TYPE

<typeName> : (<enumValue>:=<integer value>, …,

<enumValue>:=<integer value>) := <defaultValue>;

END_TYPE

Definition of an enumeration type with user-defined values for each element. The default value is optional.

Array Types

TYPE

<typeName>: ARRAY [<from>..<to>,<from>..<to>] OF <typeName> :=

[<defaultValue>, <repetition>(<defaultValue>), …];

END_TYPE

Definition of an array type. The array may be multi-dimensional. The index range is defined for each dimension. At runtime the boundaries of the array are checked. A boundary violation leads to a runtime-error. The default values are defined in ascending order starting with the last dimension. A value can be repeated by placing it into parentheses prefixed with the number of repetitions. If the number of defined default values does not match the array size, initialization is truncated or padded with the default value of the element type. In either cases a compile-time warning is issued.

Structure Types

TYPE

<typeName>: STRUCT

    <memberName>: memberType;

    …

END_STRUCT := (<memberName> := <defaultValue>, …);

END_TYPE

Defines a structure type of the given members. Currently, the default value is placed after the type definition. This positional style is a difference to the ST-standard.

Pointer Types

TYPE

    <typeName>: REF_TO <basetypeName>;

END_TYPE

Defines a pointer type of the given base type.