====== Conditional Logic ====== Conditional logic commands enable a procedure to test the value of variables or expressions and then branch to appropriate routines. ^Command^Description^ |[[case|Begin Case]]\\ [[case|Case statement]]\\ [[case|End Case]]|Tests a series of conditions (cases). When any one is met, the statements dependent on that condition are executed. All subsequent condition tests (cases) are skipped.| |[[if_conditional_expression|If conditional expression]]|Same as single-line If statement, except that the entire statement is evaluated as an expression, returning only one of two values.| |[[if|If...Then...Else statements]]|Performs single-line or multiple-line logic. If not single-line, statements for both branches must be delimited with End. Multi-line conditional logic syntax is applicable to all conditional statements (such as Read or Locate statements).| |[[null|Null statement]]|A no-op. Used if a statement is called for, but no action is desired (example: If ... Then Null Else ...).| |[[on...gosub|On...GoSub statement]]|Branches, based on an index, to a series of labels to multiple locations. When the subroutine returns, control returns to the statement following this one.| |[[on...goto|On...GoTo statement]]|Branches, based on an index, to a series of labels to multiple locations.| |[[loop|Until/While statement]]|Establishes exit conditions for a loop created by the Loop ... Repeat or the For...Next statements.|