mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-09-16 16:44:05 +00:00
6e01fc8dce
Added new _STRCMP and _STRICMP commands for quick string comparisons. Cleaned up QB64 to finish removing the QUI (quick user insert) code and folders. Altered UCASE and LCASE routines to be faster in some situations for us.
37 lines
No EOL
895 B
Text
37 lines
No EOL
895 B
Text
The {{KW|_ROUND}} function rounds to the closest EVEN [[INTEGER]], [[LONG]] or [[_INTEGER64]] numerical value.
|
|
|
|
|
|
{{PageSyntax}}
|
|
:: value = _ROUND ({{Parameter|number}})
|
|
|
|
|
|
{{PageDescription}}
|
|
* Can round [[SINGLE]], [[DOUBLE]] or [[_FLOAT]] floating decimal point parameter values.
|
|
* Can be used when numerical values exceed the limits of [[CINT]] or [[CLNG]].
|
|
* Rounding is done to the closest even [[INTEGER|integer]] value. The same as Qbasic does with [[\|integer division]].
|
|
|
|
|
|
''Example:'' Displays how QB64 rounds to the closest even integer value.
|
|
{{CodeStart}}
|
|
{{Cl|PRINT}} {{Cl|_ROUND}}(0.5)
|
|
{{Cl|PRINT}} {{Cl|_ROUND}}(1.5)
|
|
{{Cl|PRINT}} {{Cl|_ROUND}}(2.5)
|
|
{{Cl|PRINT}} {{Cl|_ROUND}}(3.5)
|
|
{{Cl|PRINT}} {{Cl|_ROUND}}(4.5)
|
|
{{Cl|PRINT}} {{Cl|_ROUND}}(5.5) '' ''
|
|
{{CodeEnd}}
|
|
{{OutputStart}}0
|
|
2
|
|
2
|
|
4
|
|
4
|
|
6
|
|
{{OutputEnd}}
|
|
|
|
|
|
''See also:''
|
|
* [[INT]], [[CINT]]
|
|
* [[FIX]], [[CLNG]]
|
|
|
|
|
|
{{PageNavigation}} |