_ROUND

From QB64 Wiki
Revision as of 00:09, 9 September 2017 by imported>SMcNeill (style guidelines)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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


Syntax

value = _ROUND(number)


Description


Example: 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:



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