QB64.com

QB64 is a modern extended BASIC programming language that retains QBasic/QuickBASIC 4.5 compatibility and compiles native binaries for Windows, Linux, and macOS.

The _ROUND function rounds to the closest even INTEGER, LONG or _INTEGER64 numerical value.

Syntax

value = _ROUND(number)

Description

Example(s)

Displays how QB64 rounds to the closest even integer value.


PRINT _ROUND(0.5)
PRINT _ROUND(1.5)
PRINT _ROUND(2.5)
PRINT _ROUND(3.5)
PRINT _ROUND(4.5)
PRINT _ROUND(5.5) 


0
2
2
4
4
6

See Also