[
next
] [
prev
] [
prev-tail
] [
tail
] [
up
]
Round
Declaration:
Function Round (X : Real) : Longint;
Description:
Round
rounds
X
to the closest integer, which may be bigger or smaller than
X
.
Errors:
None.
See also:
Frac
(
503
),
Int
(
523
),
Trunc
(
585
)
Listing:
refex/ex54.pp
Program
Example54;
{
Program
to
demonstrate
the
Round
function.
}
begin
Writeln
(Round(1234.56));
{
Prints
1235
}
Writeln
(Round(-1234.56));
{
Prints
-1235
}
Writeln
(Round(12.3456));
{
Prints
12
}
Writeln
(Round(-12.3456));
{
Prints
-12
}
end.
[
next
] [
prev
] [
prev-tail
] [
front
] [
up
]