[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
ROUND Round to Nearest Integer pp 142
Syntax: Round (RealVar) ;
Type: Integer
Form: Function
Purpose: Round RealVar to the nearest integer.
Notes: If RealVar >= 0 then Round (RealVar) = Trunc (RealVar + 0.5).
If RealVar < 0 then Round (RealVar) = Trunc (RealVar - 0.5).
----------------------------------------------------------------------------
Usage:
CONST
Real1 : Real = 2.5 ; { IntVar = 3 after Round }
Real2 : Real = 0.5 ; { IntVar = 1 after Round }
Real3 : Real = -3.4 ; { IntVar = -3 after Round }
Real4 : Real = -0.6 ; { IntVar = -1 after Round }
See Also:
Int
Trunc
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson