1
1
Fork 0
mirror of https://github.com/QB64Official/qb64.git synced 2024-07-03 08:51:22 +00:00
qb64/internal/help/CSNG.txt

33 lines
682 B
Plaintext
Raw Normal View History

2017-10-10 14:55:21 +00:00
[[CSNG]] converts a numerical value to the closest [[SINGLE]]-precision number.
2016-03-18 11:36:04 +00:00
{{PageSyntax}}
2017-10-10 14:55:21 +00:00
: {{Parameter|singleValue!}} = [[CSNG]]({{Parameter|expression}})
2021-02-18 17:11:22 +00:00
{{PageParameters}}
2017-10-10 14:55:21 +00:00
* {{Parameter|expression}} is any [[TYPE]] of literal or variable numerical value or mathematical calculation.
2016-03-18 11:36:04 +00:00
{{PageDescription}}
2017-10-10 14:55:21 +00:00
* Returns the closest [[SINGLE]] decimal point value.
2016-03-18 11:36:04 +00:00
* Also used to define a value as [[SINGLE]]-precision up to 7 decimals.
2017-10-10 14:55:21 +00:00
{{PageExamples}}
{{CodeStart}}
A# = 975.3421222#
PRINT A#, CSNG(A#)
{{CodeEnd}}
2016-03-18 11:36:04 +00:00
{{OutputStart}}975.3421222      975.3421
{{OutputEnd}}
''See also:''
2016-03-18 11:36:04 +00:00
* [[CDBL]], [[CLNG]]
* [[CINT]], [[INT]]
* [[_ROUND]]
2019-04-15 01:15:33 +00:00
{{PageNavigation}}