Difference between revisions of "Round"

From Lazarus wiki
Jump to navigationJump to search
(Created page with "Function '''Round''' rounds a real-type value to an Integer-type value. X is a real-type expression. Round returns a Longint value that is the value of X rounded t...")
 
m
Line 1: Line 1:
Function '''Round''' rounds a [[real]]-type value to an [[Integer]]-type value.
+
Function '''Round''' rounds a [[Real|real]]-type value to an [[Integer]]-type value.
 
X is a real-type expression. Round returns a [[Longint]] value that is the value of X rounded to the nearest whole number. If X is exactly halfway between two whole numbers, the result is the number with the greatest absolute magnitude.
 
X is a real-type expression. Round returns a [[Longint]] value that is the value of X rounded to the nearest whole number. If X is exactly halfway between two whole numbers, the result is the number with the greatest absolute magnitude.
  

Revision as of 23:15, 21 July 2015

Function Round rounds a real-type value to an Integer-type value. X is a real-type expression. Round returns a Longint value that is the value of X rounded to the nearest whole number. If X is exactly halfway between two whole numbers, the result is the number with the greatest absolute magnitude.

Declaration

function Round(X: Real): Longint;

See also: