Keywords Delphi

Dividend Div Divisor


Description
The Div keyword gives the whole number result of dividing the Dividend by the Divisor.

Any remainder is discarded.

Related commands
Mod Performs integer division, returning the remainder

Example code : A simple example
var
int : Integer;
begin
// Divide a primary integer by 2 - it discards the remainder
int := 17 Div 2;
ShowMessage('17 div 2 = '+IntToStr(int));
end;

Show full unit code
17 div 2 = 8