Difference between revisions of "CSNG"

From QB64 Wiki
Jump to navigation Jump to search
imported>Clippy
m
imported>Clippy
m
Line 11: Line 11:
  
  
 +
''Example:''
  
:A# = 975.3421222#
+
{{CodeStart}}
:PRINT A#, CSNG(A#)
+
A# = 975.3421222#
+
PRINT A#, CSNG(A#)
:975.3421222      975.3421
+
{{CodeEnd}}
  
 +
{{OutputStart}}
 +
975.3421222      975.3421
 +
{{OutputEnd}}
  
''See also:'' [[CDBL]], [[CLNG]], [[CINT]], [[INT]]
 
  
  
 +
''See also:''
  
==Navigation:==
+
[[CDBL]], [[CLNG]], [[CINT]], [[INT]]
  
[[Keyword_Reference_-_Alphabetical|Go to Keyword Reference - Alphabetical]]
 
  
[[Keyword Reference - By usage|Go to Keyword Reference - By usage]]
+
 
 +
{{PageNavigation}}

Revision as of 22:56, 18 June 2010

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.


Example:

A# = 975.3421222# PRINT A#, CSNG(A#)

975.3421222      975.3421


See also:

CDBL, CLNG, CINT, INT




Navigation:
Keyword Reference - Alphabetical
Keyword Reference - By Usage
Main Wiki Page