Virtually any data item has a true/false value. In particular, the following
objects have false logical value
- The scalar 0
- The empty matrix or empty list []
- A matrix whose entries are all zero
- The empty string ""
Anything else would have true logical value.
There is no special type for logical values. The result of any
relational or logical operation is either 1 or 0. But if one wish,
one can always define two global variables true and false
global.true = 1;
global.false = 0;
and always use true and false for logical values.
oz
2009-12-22