Next:
Logical not: !
Up:
Logical Operators
Previous:
Logical and: &&
Contents
Logical
or
:
||
A || B
is true if either
A
or
B
is true, and false otherwise. The interpreter will evaluate
A
first. If it is true,
B
will not be evaluated.
>> x = ("abc", "def", "ghi", "jkl"); >> k = 3; >> if (k < 1 || k > #x) "Invalid selection" end
oz 2009-12-22