Description |
Divides ValueA by ValueB and returns the remainder from this division.
An exception is thrown if the divide fails.
|
| Notes | Static methods are not methods of an object - they are simply class functions or procedures available at any time.
|
|
Microsoft MSDN Links |
System
System.Decimal
|
|
|
A simple example |
program Project1;
{$APPTYPE CONSOLE}
var
valueA, valueB : Decimal;
result : Decimal;
rem : Decimal;
begin
valueA := 16.8;
valueB := 4;
result := System.Decimal.Divide(valueA, valueB);
rem := System.Decimal.Remainder(valueA, valueB);
Console.WriteLine('valueA = {0}', valueA.ToString);
Console.WriteLine('valueB = {0}', valueB.ToString);
Console.WriteLine('valueA divided by valueB = {0}', result.ToString);
Console.WriteLine(' remainder = {0}', rem.ToString);
Console.ReadLine;
end.
| Show full unit code | valueA = 16.8
valueB = 4
valueA divided by valueB = 4.2
remainder = 0.8
|
|
|
|