CLNG: Difference between revisions
Jump to navigation
Jump to search
Navigation:
Main Page with Articles and Tutorials
Keyword Reference - Alphabetical
Keyword Reference - By usage
Report a broken link
No edit summary |
No edit summary |
||
Line 29: | Line 29: | ||
{{PageSeeAlso}} | {{PageSeeAlso}} | ||
* [https://qb64phoenix.com/forum/showthread.php?tid=3661 Featured in our "Keyword of the Day" series] | |||
* [[CINT]], [[INT]] | * [[CINT]], [[INT]] | ||
* [[CSNG]], [[CDBL]] | * [[CSNG]], [[CDBL]] |
Revision as of 15:54, 4 May 2025
The CLNG function rounds decimal point numbers up or down to the nearest LONG integer value.
Syntax
- value& = CLNG(expression)
Parameters
- expression is any TYPE of literal or variable numerical value or mathematical calculation.
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.
- CLNG can return normal INTEGER values under 32768 too.
- Use it when a number could exceed normal INTEGER number limits.
Examples
a& = CLNG(2345678.51) PRINT |
2345679 |
See also