System.Math.DivMod

From Appmethod Libraries
Jump to: navigation, search

Object Pascal

procedure DivMod(Dividend: Cardinal; Divisor: Word; var Result, Remainder: Word);
procedure DivMod(Dividend: UInt64; Divisor: UInt64; var Result, Remainder: UInt64); overload;

C++

extern DELPHI_PACKAGE void __fastcall DivMod(unsigned Dividend, System::Word Divisor, System::Word &Result, System::Word &Remainder)/* overload */;

Properties

Type Visibility Source Unit Parent
procedure
function
public
System.Math.pas
System.Math.hpp
System.Math System.Math

Description

Returns the result of an integer division, including the remainder.

Call DivMod to perform 16-bit integer division and fetch the remainder as well, all in one operation.

Dividend is the integer into which you are dividing.

Divisor is the value by which to divide Dividend.

Result returns the result of the integer division.

Remainder returns the remainder (the difference between Result * Divisor and Dividend).

See Also