Previous Topic: LOGARITHMNext Topic: NEXT-INT-EQHI


MODULO

Purpose

Returns the modulus (remainder) of one numeric value divided by another.

Syntax

►►─── MODulo ( dividend, divisor ) ───────────────────────────────────────────►◄

Parameters

dividend

Specifies the numeric value that is divided by divisor.

divisor

Specifies the numeric value that is divided into dividend.

Dividend and divisor can be:

Example

In the following example, the modulo function is used to find the remainder resulting from the division of two numeric values:

Initial values:
    WK-VALUE1: 43
    WK-VALUE2: 10
Statement:
    MOVE MODULO(WK-VALUE1,WK-VALUE2) TO WK-REMAINDER.
Returned value: 3