BOOL() |
|
|
The BOOL() function converts a value to Boolean form.
Format
BOOL(expr)
where
The BOOL() function returns False if expr is zero or a null string, True for all other values.
This function is rarely needed because all QMBasic operations requiring a Boolean value perform the conversion automatically. It might be useful, for example, when constructing a data collection that will be converted to JSON using the JBUILD() function as JSON differentiates Boolean and numeric values.
Example
N = BOOL(X)
This statement converts X to Boolean form using the rules described above.
|