Home  |  Delphi .net Home  |  System.Decimal  |  Negate Method
  
Negate  
Method  
Returns the supplied decimal value negated
Decimal Structure
System NameSpace
CF1.  Function Negate ( Value : Decimal ) : Decimal; Static;
CF : Methods with this mark are Compact Framework Compatible
Description
The returned value is Value multiplied by -1.
Microsoft MSDN Links
System
System.Decimal
 Author links

 Buy Website Traffic at
 Buywebsitetrafficexperts.com

 Buy Proxies at
 Buyproxies.io
 
 
 
A simple example
program Project1;
{$APPTYPE CONSOLE}

var
  value  : Decimal;
  result : Decimal;

begin
  value := 16.8;

  result := System.Decimal.Negate(value);

  Console.WriteLine('value         = {0}', value.ToString);
  Console.WriteLine('value negated = {0}', result.ToString);

  Console.ReadLine;
end.
   value         = 16.8
   value negated = -16.8
 
 
Delphi Programming Neil Moffatt 2002 - 2017. All rights reserved.  |  Contact the author