1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-05 08:50:24 +00:00
QB64-PE/internal/help/CLNG.txt

37 lines
851 B
Plaintext
Raw Normal View History

The {{KW|CLNG}} function rounds decimal point numbers up or down to the nearest {{KW|LONG}} integer value.
{{PageSyntax}}
2016-03-18 11:36:04 +00:00
:: value = '''CLNG('''''expression''''')'''
{{Parameters}}
* The ''expression'' is any [[TYPE]] of literal or variable numerical value or mathematical calculation.
{{PageDescription}}
* 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 {{KW|INTEGER}} values under 32768 also.
* Use it when a number could exceed normal {{KW|INTEGER}} number limits.
{{PageExamples}}
{{CodeStart}}
a& = {{Cl|CLNG}}(2345678.51)
{{Cl|PRINT}}
{{CodeEnd}}
{{OutputStart}}
2345679
{{OutputEnd}}
{{PageSeeAlso}}
2016-03-18 11:36:04 +00:00
* [[CINT]], [[INT]]
* [[CSNG]], [[CDBL]]
* [[_ROUND]]
{{PageNavigation}}