Basicly there is no boolean value. The number 0 is considered to be false and all other numbers are considered to be true....
Please consider the following expressions.
(1 == 1) true (1 != 1) false (i = 1) true (i = 0) false (i = 1 + 1) true
The first two examples should be clear but the last ones need explanation .
The last three examples assign a value to a variable and a side effect of assignment is to return the value assigned, it is this value that is tested to be true or false.
Looking at the last example:
(i = 1 + 1) (i = 2) (2)
Top | Master Index | Keywords | Functions |
Corrections made by Christopher Wolf