Silverfrost Logo About Us | Contact Us
 

MOD

Platform

x64, Win32, .NET

Purpose

To get the remainder after division.

Class

Elemental function.

Syntax

INTEGER FUNCTION MOD(A, P); INTEGER A, P
REAL FUNCTION MOD(A, P); REAL A, P

Description

P and the result have the same type and kind type as A.

Return value

If P 0, the result is the remainder of A after division by P given by A - INT(A/P) * P.

Example

MOD(4.0, 3.0) gives approximately 1.0. MOD(8, -6) gives 2.

 

 

Copyright © 1999-2017 Silverfrost Limited