Siebel VB Language Reference > VB Language Reference >
CDbl Function
This standard VB function converts an expression to the data type double. Syntax
CDbl(expression)
|
|
expression |
Any expression that evaluates to a number |
Returns
The value of expression as a double-precision number. Usage
CDbl accepts any type of expression. Strings that cannot be converted to a double-precision floating point result in a Type Mismatch error. Variants containing null result in an Illegal Use of Null error. Example
This example calculates the square root of 2 as a double-precision floating-point value and displays it in scientific notation. Sub Button_Click Dim value Dim msgtext value = CDbl(Sqr(2)) msgtext = "The square root of 2 is: " & Value End Sub
Related Topics
CCur Function CInt Function CLng Function CSng Function CStr Function CVar Function CVDate Function
|