CSng (function)

<< Click to Display Table of Contents >>

CSng (function)

CSng(Expression)

Converts an expression to the Single data type.

See also: CDbl, CInt, CLng, CStr

Example:

Sub Main

 Dim y As Integer

 y = 25

 If VarType(y) = 2 Then

         Print y

         x = CSng(y)

         Print x

 End If

End Sub