Skip to main content

Cbool()

Converst an expression into a boolean.  So if the expression is true, i.e. 5 = 5 then it would return True, if it is false, i.e. 5 = 6 then it would return false.

Script

Sub Main
    Dim a, b, c As Integer
    Dim check As Boolean
    a = 5
    b = 5
    c = 6
    check = CBool(a = b)
    MsgBox check 'returns True
    check = CBool(a = c)
    MsgBox check 'returns False

End Sub

IDEAScript Language