bool

Syntax

bool(X)

Arguments

X can be of any data type.

Details

Convert the input to a boolean value.

Examples

$ x=bool()
$ x;
00b
$ typestr x
BOOL

$ bool(`true`false)
[1,0]

$ bool(100.2)
1

$ bool(0)
0