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 Normal View History

[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)