Previous Page
Next Page

14.3. Boolean Coercions

A boolean may be coerced to a string; depending on whether the boolean is true or false, this string will be either "true" or "false".

A string may be coerced to a boolean . The string "true" (not case-sensitive) will be TRue; any other string will be false.

A boolean may be coerced to an integer ; depending on whether the boolean is TRue or false, this integer will be either 1 or 0.

The integers 1 and 0 may be coerced to a boolean, yielding true and false respectively; other integers can't be coerced to a boolean.


Previous Page
Next Page