MOVE

Short Reference

Syntax

MOVE source {TO|?TO} destination.

destination {=|?=} source.


Effect

Both these statements assign the content of the operand source to the data object destination. The variants with the addition TO or the assignment operator = are valid for all assignments between operands that are not reference variables, and for assignments between reference variables for which the static type of source is more specific than or the same as the static type of destination (narrowing cast).

Variants with the addition ?TO or the assignment operator ?= (casting operator) must be used if the source and destination are reference variables and the static type of source is more general than the static type of destination (down cast). For assignments between operands that are not reference variables, use of the question mark ? is not permitted.

The data object destination can be any data object that can be listed at a write position, and the data object source can be a data object, a predefined function or a functional method (as of release 6.10). The data type of the data object destination must either be compatible with the data type of source, or it must be possible to convert the content of source into the data type of destination according to one of the conversion rules.

Notes

Exceptions

Catchable Exceptions

CX_SY_CONVERSION_NO_NUMBER

CX_SY_CONVERSION_OVERFLOW

CX_SY_MOVE_CAST_ERROR

Non-Catchable Exceptions