Type Conversion Functions

Top  Previous  Next

Sub CStr(expression) As String
Sub CInt(expression) As Integer
Sub CDbl(expression) As Double
Sub CBool(expression) As Boolean

 

Converts expression to a specific data type.

 

If you convert strings to numerical values, you should ensure that the string contains a correct number.

 

Example:

Dim $i, $s

 

$i = CInt("123.44")

' returns i = 123

 

$i = CInt("1.aa123,99")

' returns 1

 

$i = CInt(ExtractDigits("1.aa123,99"))

' returns 112399

 

$s = CStr(1123)

' returns s = "1123"