CLNG - QB64 Wiki

CLNG

From QB64 Wiki

Revision as of 14:45, 28 April 2011 by Clippy (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The CLNG function rounds decimal point numbers up or down to the nearest LONG integer value.


Syntax:

a% = CLNG(DecimalPointNumber#)


Description:

  • Used when integer values exceed 32767 or are less than -32768.
  • Values greater than .5 are rounded up; .5 or lower are rounded down like "bankers rounding".
  • CLNG can return normal INTEGER values under 32768 also.
  • Use it when a number could exceed normal INTEGER number limits.


Code Examples:

a& = CLNG(2345678.51) PRINT

2345679


See also:



Navigation:
Go to Keyword Reference - Alphabetical
Go to Keyword Reference - By usage
Go to Main WIKI Page