1
1
Fork 0
mirror of https://github.com/DualBrain/QB64.git synced 2023-11-19 13:10:13 +00:00
QB64-website/wiki/CLNG.md
2022-12-24 19:12:43 -06:00

747 B

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

Syntax

value& = CLNG(expression)

Parameter(s)

  • 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.

Example(s)


a& = CLNG(2345678.51)
PRINT


 2345679 

See Also