Bookshelf Home | Contents | Index | Search | PDF |
Siebel VB Language Reference > Siebel VB Language Reference >
CDbl Function
This standard VB function converts an expression to the data type double.
Syntax
CDbl(expression)
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 SubSee Also
CCur Function
CInt Function
CLng Function
CSng Function
CStr Function
CVar Function
CVDate Function
Bookshelf Home | Contents | Index | Search | PDF |
Siebel VB Language Reference Published: 18 June 2003 |