TOLOGICAL (Value) TOLOGICAL (Value)

Value

The value to convert.

Returns

Logical Logical

A logical value corresponding to the given value.

Returns the given value converted to a logical value. TOLOGICAL (1) TOLOGICAL (1) returns TRUE.

When the sole parameter is a logical value, it is returned unchanged. When it is a number, 0 is converted to FALSE and all other values are converted to TRUE. When it is a temporal value, the temporal value denoted by the serial number 0 is converted to FALSE and all other temporal values are converted to TRUE. When it is a color, a fully-opaque black color is converted to FALSE and all other values are converted to TRUE. Text strings with a length of zero are converted to FALSE, and all other text strings are converted to TRUE.

This function is not commonly supported by spreadsheets.

Examples

TOLOGICAL (FALSE)
TOLOGICAL (FALSE)

Returns FALSE.

TOLOGICAL (TRUE)
TOLOGICAL (TRUE)

Returns TRUE.

TOLOGICAL (0)
TOLOGICAL (0)

Returns FALSE.

TOLOGICAL (1)
TOLOGICAL (1)

Returns TRUE.

TOLOGICAL (999)
TOLOGICAL (999)

Returns TRUE.

TOLOGICAL ( - 999)
TOLOGICAL ( - 999)

Returns TRUE.

TOLOGICAL (Color.Black)
TOLOGICAL (Color,Black)

Returns FALSE.

TOLOGICAL (Color.Red)
TOLOGICAL (Color,Red)

Returns TRUE.

TOLOGICAL ("")
TOLOGICAL ("")

Returns FALSE.

TOLOGICAL ("test")
TOLOGICAL ("test")

Returns TRUE.

fxEngine Shell Want this in your own terminal? A standalone version is coming. Get notified.
Loading fxEngine Shell