Statement DO CASE Foundation
Executes one of several program sections
DO CASE
CASE <lExpression1>
<SourceCode>...
[CASE <lExpression2>]
<SourceCode>...
[OTHERWISE]
<SourceCode>...
END[CASE]
DO CASE...ENDCASE is a control structure for branching program execution to code following the first CASE statement whose condition <lExpression> evaluates to .T. (true). The program lines which follow the CASE statement are executed up to the next CASE, OTHERWISE or ENDCASE statement. The program continues at the first executable program line following the ENDCASE statement. If all CASE conditions evaluate to .F. (false), execution continues following the OTHERWISE statement. If OTHERWISE is not specified, the program continues following the ENDCASE statement.
The number of CASE conditions for DO CASE is unlimited, and DO CASE can be nested to any depth. The control structure performs similar to the IF...ELSEIF...ELSE...ENDIF structure.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.