CBool - Built-in Conversion Function¶
See Also¶
Purpose¶
CBool returns an expression converted to a boolean.
Syntax¶
CBool(exp)
Arguments¶
| Argument | Required | Description |
|---|---|---|
exp |
Yes | Any valid expression |
Returns¶
Boolean
Example¶
Dim iVal1
Dim iVal2
Let iVal1 = 4
Let iVal2 = 5
Return CBool(iVal1 = iVal2)
Notes¶
- If
expevaluates to zero, CBool returnsfalse(0); otherwise, CBool returnstrue(-1). - When
expcannot be converted to a boolean, a runtime error is generated.