DIVIDE

Basic form

DIVIDE n1 BY n2.

Effect

Divides the contents of n1 by n2 and places the result in n1.
The equivalent is: n1 = n1 / n2.

Example

DATA: SUM TYPE P, NUMBER TYPE P.
DIVIDE SUM BY NUMBER.

Note

The specified details on conversions and performance for COMPUTE apply in the same way to DIVIDE. Also: division by 0 is not allowed. Exception: 0 / 0 gives 0.

Exceptions

Catchable Exceptions

CX_SY_ARITHMETIC_OVERFLOW

CX_SY_CONVERSION_OVERFLOW

CX_SY_ARITHMETIC_OVERFLOW

CX_SY_ZERODIVIDE

Non-Catchable Exceptions

Related

COMPUTE, DIVIDE-CORRESPONDING

Additional help

Arithmetic Calculations