Skip to content

Flow documentation · legacy product

Round ​

Declaration ​

Function Round( aValue : Extended) : Integer

Example ​

pascal
procedure OnMapEvent(var Value:Variant);
begin
  Value := Round(123.455) //result is 123
end;

Description ​

Returns aValue rounded to the nearest whole number using biased rounding (bankers rounding). This means that 5 is always rounded to the nearest even number

Refer to Round2 or Round2Up for a function that rounds to a specified number of decimal places. Also refer to Round2BR for a function that uses bankers rounding to a specified number of decimal places. Refer to Trunc for a function that trims the decimal places

Examples of rounding ...

Round(3.4) = 3

Round(3.5) = 4

Round(3.6) = 4

Round(4.4) = 4

Round(4.5) = 4

Round(4.6) = 5