Difference between revisions of "CLNG"

From QB64 Wiki
Jump to navigation Jump to search
(Created page with 'CLNG function rounds decimal point numbers up or down to the nearest integer value. Values greater than .5 are rounded up; .5 or lower are rounded down just like "bankers roundin…')
 
Line 1: Line 1:
CLNG function rounds decimal point numbers up or down to the nearest integer value. Values greater than .5 are rounded up; .5 or lower are rounded down just like "bankers rounding".  
+
The ''CLNG'' function rounds decimal point numbers up or down to the nearest integer value. Values greater than .5 are rounded up; .5 or lower are rounded down just like "bankers rounding".  
  
  
Useage: a% = CINT(DecimalNumber!)  
+
Useage: a% = CLNG(DecimalPointNumber#)  
  
  
Example: a% = CINT(1.51)  
+
''Example:'' a% = CLNG(2345678.51)  
  
Results: a% = 2
+
''Results:'' a% = 2345679
  
  
Warning: Since CINT is used for integer values, the input values cannot exceed 32767!
 
  
 
+
''See also:'' [[CINT]], [[INT]]
See also: CINT  
 
 
 
Retrieved from "http://qb64.net/wiki/index.php?title=CINT"
 

Revision as of 05:56, 28 August 2009

The CLNG function rounds decimal point numbers up or down to the nearest integer value. Values greater than .5 are rounded up; .5 or lower are rounded down just like "bankers rounding".


Useage: a% = CLNG(DecimalPointNumber#)


Example: a% = CLNG(2345678.51)

Results: a% = 2345679


See also: CINT, INT