1
1
Fork 0
mirror of https://github.com/DualBrain/QB64.git synced 2023-11-19 13:10:13 +00:00
QB64-website/wiki/CASE-IS.md
2022-12-24 19:12:43 -06:00

1.2 KiB

See SELECT CASE.

CASE IS can be used in a SELECT CASE routine where you need to use relational conditional expressions.

Syntax

CASE IS {=|<|>|<=|>=|<>|NOT} expression

Description

  • AND (boolean) can be used to add extra conditions to a CASE IS statement evaluation.
  • OR (boolean) can be used to add alternate conditions to a CASE IS statement evaluation.
  • Parenthesis are allowed in CASE IS statements to clarify an evaluation.
  • CASE IS > 100 uses the greater than expression.
  • CASE IS <= 100 uses the less than or equal to expression.
  • CASE IS <> 100 uses the not equal to expression(same as NOT 100).

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

See Also