2015-08-02 12:12:44 +00:00
|
|
|
|
'''CSNG'''
|
|
|
|
|
To converts a numerical value to the closest [[SINGLE]]-precision number.
|
|
|
|
|
|
|
|
|
|
|
2016-03-18 11:36:04 +00:00
|
|
|
|
{{PageSyntax}}
|
|
|
|
|
:: singlevalue = '''CSNG('''''expression''''')'''
|
2015-08-02 12:12:44 +00:00
|
|
|
|
|
|
|
|
|
|
2016-03-18 11:36:04 +00:00
|
|
|
|
{{Parameters}}
|
|
|
|
|
* The ''expression'' is any [[TYPE]] of literal or variable numerical value or mathematical calculation.
|
2015-08-02 12:12:44 +00:00
|
|
|
|
|
|
|
|
|
|
2016-03-18 11:36:04 +00:00
|
|
|
|
{{PageDescription}}
|
|
|
|
|
* Returns the closest [[SINGLE]] decimal point value
|
|
|
|
|
* Also used to define a value as [[SINGLE]]-precision up to 7 decimals.
|
2015-08-02 12:12:44 +00:00
|
|
|
|
|
|
|
|
|
|
2016-03-18 11:36:04 +00:00
|
|
|
|
''Example:''
|
2015-08-02 12:12:44 +00:00
|
|
|
|
{{CodeStart}}
|
|
|
|
|
A# = 975.3421222#
|
|
|
|
|
PRINT A#, CSNG(A#)
|
|
|
|
|
{{CodeEnd}}
|
2016-03-18 11:36:04 +00:00
|
|
|
|
{{OutputStart}}975.3421222 975.3421
|
2015-08-02 12:12:44 +00:00
|
|
|
|
{{OutputEnd}}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
''See also:''
|
2016-03-18 11:36:04 +00:00
|
|
|
|
* [[CDBL]], [[CLNG]]
|
|
|
|
|
* [[CINT]], [[INT]]
|
|
|
|
|
* [[_ROUND]]
|
2015-08-02 12:12:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{{PageNavigation}}
|