# CBool

Boolean = CBool ( Expression )

Converts an expression into a boolean.

An expression is false if it is:

- A false boolean.
- A zero number.
- A zero length string.
- A null object.

An expression is true in all other cases.

Example

    PRINT CBool(0); " "; CBool(1)

    FALSE TRUE

    PRINT CBool("Gambas"); " "; CBool("")

    TRUE FALSE

    PRINT CBool(NULL)

    FALSE

Previous: CATCH Next: CByte