QB64.com

QB64 is a modern extended BASIC programming language that retains QBasic/QuickBASIC 4.5 compatibility and compiles native binaries for Windows, Linux, and macOS.

The OR conditional operator evaluates an expression to true (-1) if any of the arguments is also true.

Syntax

IF expression1 OR expression2 THEN {code}

Description

Relational Operators:

Symbol Condition Example Usage
= Equal IF a = b THEN
<> NOT equal IF a <> b THEN
< Less than IF a < b THEN
> Greater than IF a > b THEN
<= Less than or equal IF a <= b THEN
>= Greater than or equal IF a >= b THEN

Example(s)


a% = 100
b% = 50

IF (a% > b% AND a% < 100) OR b% = 50 THEN PRINT "True"


True

Explanation: The first evaluation was False, but the OR evaluation made the statement true and the code was executed.

See Also