|
<< Index >> |
FutureBasic |
∣∣ - logical 'or' | operator | |
|
age ⩵ 21
is true, and is therefore evaluated as true. The expression age ⩵ 22
is false, and is therefore evaluated as false. Then the logical comparison (true)
(false)
is performed, resulting in true ( because one operand's content is non-zero). Finally, the age = 21
if ( age ⩵ 21 ∣∣ age ⩵ 22 )
print "Congratulations!"
else
print "Sorry. you must be 21 or 22 years of age to qualify!"
end if
JoeIsHere = 16
FredIsHere = 0
if JoeIsHere ∣∣ FredIsHere
print "One of them is here!"
else
print "Neither one is here!"
end if