1
1
Fork 0
mirror of https://github.com/QB64Official/qb64.git synced 2024-07-16 21:15:15 +00:00
qb64/internal/help/CSNG.md

36 lines
624 B
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[CSNG](CSNG) converts a numerical value to the closest [SINGLE](SINGLE)-precision number.
## Syntax
> singleValue! = [CSNG](CSNG)(expression)
## Parameter(s)
* expression is any [TYPE](TYPE) of literal or variable numerical value or mathematical calculation.
## Description
* Returns the closest [SINGLE](SINGLE) decimal point value.
* Also used to define a value as [SINGLE](SINGLE)-precision up to 7 decimals.
## Example(s)
```vb
A# = 975.3421222#
PRINT A#, CSNG(A#)
```
```text
975.3421222      975.3421
```
## See Also
* [CDBL](CDBL), [CLNG](CLNG)
* [CINT](CINT), [INT](INT)
* [_ROUND](_ROUND)