Purpose
Returns the modulus (remainder) of one numeric value divided by another.
Syntax
►►─── MODulo ( dividend, divisor ) ───────────────────────────────────────────►◄
Parameters
Specifies the numeric value that is divided by 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
|
Copyright © 2014 CA.
All rights reserved.
|
|