Difference between revisions of "CSNG"

From QB64 Wiki
Jump to navigation Jump to search
imported>Clippy
imported>Clippy
m
Line 1: Line 1:
'''Purpose:'''
+
'''CSNG'''
To convert x to a [[SINGLE]]-precision number.
+
To converts a value to the closest [[SINGLE]]-precision number.
  
'''Syntax:''' CSNG(x)
 
  
'''Comments:'''
+
::::::'''Syntax:''' CSNG(n)
 +
 
 +
 
 +
 
 +
* n must be a numeric value (see the CINT and CDBL functions).
 +
* Also used to define a value as SINGLE-precision.
  
* x must be a numeric expression (see the CINT and CDBL functions).
 
  
'''Example:'''
 
  
 
:A# = 975.3421222#
 
:A# = 975.3421222#

Revision as of 23:29, 7 October 2009

CSNG To converts a value to the closest SINGLE-precision number.


Syntax: CSNG(n)


  • n must be a numeric value (see the CINT and CDBL functions).
  • Also used to define a value as SINGLE-precision.


A# = 975.3421222#
PRINT A#; CSNG(A#)
975.3421222 975.3421


See also: CDBL, CLNG, CINT, INT


Navigation:

Go to Keyword Reference - Alphabetical

Go to Keyword Reference - By usage