Type Conversion function
Summary
Each function coerces an expression to a specific data type.
Syntax
Each function coerces an expression to a specific data type.
Example
CBool function example
This example uses the CBool function to convert an expression to a Boolean. If the expression evaluates to a nonzero value, CBool returns True, otherwise, it returns False.
Dim A, B, Check
A = 5: B = 5 ' Initialize variables.
Check = CBool(A = B) ' Check contains True.
A = 0 ' Define variable.
Check = CBool(A) ' Check contains False.
This example uses the CBool function to convert an expression to a Boolean. If the expression evaluates to a nonzero value, CBool returns True, otherwise, it returns False.
Dim A, B, Check
A = 5: B = 5 ' Initialize variables.
Check = CBool(A = B) ' Check contains True.
A = 0 ' Define variable.
Check = CBool(A) ' Check contains False.