Boolean Constants
Boolean Constants
Boolean values represent the two values of True and false. There are defined constants true and false that represent the value 1 and 0 respectively.
Examples
| True Values | False Values |
|---|---|
| TRUE | FALSE |
| 1 | 0 |
| -56 | 0.0 |
| 9.9 | “” (empty string) |
| “something” |
In a test any non-zero number is true. A string is true unless it is empty, even “0”; only the empty string is false.