CDbl (function)

<< Click to Display Table of Contents >>

CDbl (function)

CDbl(Expression)

Converts an expression to the Double data type. The parameter Expression must be a number or a string.

See also: CInt, CLng, CSng, CStr

Example:

Sub Main

 Dim y As Integer

 y = 25

 If VarType(y) = 2 Then

         Print y

         x = CDbl(y)

         Print x

 End If

End Sub