= - Assigning Return Values and Results
7.31 | 7.40 | 7.54
destination = meth( ) | func( ) | constr_expr | table_expr .
If one of the following calls or expressions is specified on the right side of the
=, its return value or result is determined and assigned
to the left side,
destination. If necessary, type-dependent conversions are performed in accordance with the
conversion rules. The following items are possible on the right side:
functional method call
meth( )including method chainings. The return value of a function method or an attribute addressed using a method chaining always has a full type that must match the type of the left side.
- A predefined function func( ). The type of the return value (which in some numeric functions can be dependent on the data type of the argument) must match the type of the left side.
- A constructor
constr_expr. The type of the result is determined by the
typespecified for the constructor expression and must match the type of the left side.
The following can be specified for
- A variable that is compatible with the return value or to whose type the return value or result can be converted.
An inline declaration
DATA(var). The data type of the declared variable
varis the statically detectable type of the return value or result.
If an arithmetic expression is specified as an argument for one of the overloaded numeric functions, the function itself works like an arithmetic expression and its assignment is one of the assignments of arithmetic expressions. This can cause the conversions to be performed in a different order.
Assigns the return value of a method to an internal table declared inline.
DATA(itab) = m2( ).