Skip to content

or

by admin on March 12th, 2017
if myNumber < 5 or myNumber > 100 then
  -- number is not in range
end if

The or operator can be used to perform several comparisons in a row. It takes a boolean (true or false) as its left argument and another boolean as its right argument. If either is true, the and operator evaluates to true, but if none of the arguments are true, it also returns false.

No comments yet

Leave a Reply

Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS