Difference between revisions of "Floor"

From SCAR Divi Manual
Jump to: navigation, search
(Created page with "==Definition== <func>function Floor(X: Extended): Integer;</func> ==Availability== SCAR Divi 3.00 > Current ==Description== This function rounds a value given by '''X''' down. ...")
 
(Example)
Line 11: Line 11:
 
<source lang="scar">
 
<source lang="scar">
 
begin
 
begin
   WriteLn(Ceil(1.1));   
+
   WriteLn(Floor(1.1));   
   WriteLn(Ceil(1.5));
+
   WriteLn(Floor(1.5));
   WriteLn(Ceil(1.9));
+
   WriteLn(Floor(1.9));
 
end.
 
end.
 
</source>
 
</source>

Revision as of 17:21, 25 June 2011

Definition

<func>function Floor(X: Extended): Integer;</func>

Availability

SCAR Divi 3.00 > Current

Description

This function rounds a value given by X down.

Example

begin
  WriteLn(Floor(1.1));   
  WriteLn(Floor(1.5));
  WriteLn(Floor(1.9));
end.

Output:

1
1
1

See Also