CDbl Function

Converts any numerical expression or string expression to a double type.

αƒ‘αƒ˜αƒœαƒ’αƒαƒ₯αƒ‘αƒ˜

CDec(Expression)

αƒ“αƒαƒ‘αƒ αƒ£αƒœαƒ”αƒ‘αƒ£αƒšαƒ˜ αƒ›αƒœαƒ˜αƒ¨αƒ•αƒœαƒ”αƒšαƒαƒ‘αƒ:

Double

Parameters:

Expression: Any string or numeric expression that you want to convert. To convert a string expression, the number must be entered as normal text ("123.5") using the default number format of your operating system.

Error codes:

D'oh! You found a bug (text/sbasic/shared/00000003.xhp#err5 not found).

αƒ›αƒαƒ’αƒαƒšαƒ˜αƒ—αƒ˜:

Sub ExampleCountryConvert

    MsgBox CDbl(1234.5678)

    MsgBox CInt(1234.5678)

    MsgBox CLng(1234.5678)

End Sub