Difference between revisions of "ROUND"

From QB64 Wiki
Jump to navigation Jump to search
imported>Clippy
m
imported>Cyperium
m
Line 1: Line 1:
The {{KW|_ROUND}} function rounds to the closest EVEN [[INTEGER]], [[LONG]] or _INTEGER64]] numerical value.
The {{KW|_ROUND}} function rounds to the closest EVEN [[INTEGER]], [[LONG]] or [[_INTEGER64]] numerical value.





Revision as of 13:31, 16 March 2012

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:
Keyword Reference - Alphabetical
Keyword Reference - By Usage
Main Wiki Page