Zum Inhalt

boolean (Opus Funktion)

Beschreibung

Wandelt eine Zahl (integer, float oder complex) in ein Boolean um. Converts a value to a boolean. For numbers, characters and datetimes, any non-zero value yields true (for complex, any non-zero real or imaginary part). For strings, only "true" (case-insensitive) yields true. Arrays and matrices of any convertible element type are converted element-wise.

Argumente

Name

Typ

Beschreibung

Value

float

integer

complex

boolean

char

datetime

string

Wert, der in einen boolean gewandelt werden soll

Rückgabewert boolean

Umgewandelter Wert in boolean

Beispiel

Result = boolean(6.9);

Resultat: true

Siehe auch