# begin case statement

The begin case statement starts a case
construct.

## Syntax

```
begin case
 case logical.exp
 {statement{s}}
 .
 case logical.exp
 {statement{s}}
 .
 .
end case
```

## Description

Use the case statement to alter the sequence of instruction execution based on
the value of one or more expressions. If expression in the first case statement is true, the following statements up to
the next case statement are executed. Execution
continues with the statement following the end case statement.

If the expression in a case statement
is false, execution continues by testing the expression in the next case statement. If it is true, the statements following
the case statement up to the next case or end case statement are executed. Execution
continues with the statement following the end case statement.

If more than one case statement
contains a true expression, only the statements following the first
such case statement are executed. If no case statements are true, none of the statements between
the begin case and end case statements are executed.

If an expression evaluates to the
null value, the case statement is considered false.

## See also

- [begin case statement](https://d3codex.com/pickbasic-flashbasic/begin-case-statement/)
- [Branching](https://d3codex.com/definitions/branching/)
- [case statement](https://d3codex.com/pickbasic-flashbasic/case-statement/)
- [end case statement](https://d3codex.com/pickbasic-flashbasic/end-case-statement/)
- [if statement](https://d3codex.com/pickbasic-flashbasic/if-statement/)
- [Logical expressions](https://d3codex.com/pickbasic-flashbasic/logical-expressions/)
- [match relational operator](https://d3codex.com/pickbasic-flashbasic/match-relational-operator/)
- [Statements and functions](https://d3codex.com/pickbasic-flashbasic/statements-and-functions/)

---
Source: https://d3codex.com/pickbasic-flashbasic/begin-case-statement/ - part of the D3Codex reference.
