MODULO(A, P)

Purpose

Modulo function.

Class

Elemental function

Argument Type and Attributes

A
must be of type integer or real.

P
must be of the same type and kind type parameter as A.

Result Type and Attributes

Same as A.

Result Value

Examples

MODULO (8, 5) has the value 3.
MODULO (-8, 5) has the value 2.
MODULO (8, -5) has the value -2.
MODULO (-8, -5) has the value -3.

IBM Copyright 2003