Compatible Data Types

With assignments and comparisons between data objects, with the exception of reference variables, the compatibility of their data types determines whether a conversion needs to be executed or not. In the case of reference variables, the compatibility determines whether assignments or comparisons can even take place.

Note

With assignments to field symbols or when assigning actual parameters to formal parameters, a typing check is executed, in which the compatibility is defined somewhat differently.

All Data Types Except for Reference Types

For all data types other than reference types and those that contain reference types as components, the term compatibility is synonymous for assignments and comparisons. Two data objects or their data types are compatible if all their technical type attributes match:

The types listed here are compatible with one another - for example, an elementary data type is never compatible with a structure, even if the latter has only one component.

Reference Types

Reference types can only be compatible with other reference types; data reference variables are not compatible with object reference variables and vice versa. In the case of reference variables, the term compatibility is not synonymous for assignments an comparisons:

No conversion takes place for reference variables. They are either assigned to one another or compared to each other unconverted or not at all.

Notes