Round

From Soldat Community Wiki
Revision as of 08:02, 25 March 2013 by Tehbugerz0r (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

From the Scripting Manual

function round(Number: real): integer;

Parameter Info:
 Number (Real): Numeric value to round up/down.

Description:
 This function will return the rounded up/down value of parameter 'Number'

Examples

var
MyDub: double;
MyInt: integer;
begin
    MyDub := 553.55;
    MyInt := 42;
    WriteLn(inttostr(round(MyInt))); //42
    WriteLn(inttostr(round(MyDub))); //554
end;


See also