Navigation: thinBasic language > Program Flow > SELECT |
|
Description
Control program flow based on the value of an expression.
Syntax
SELECT CASE SelectExpression
CASE test
{statements}
[CASE test
{statements}]
[CASE ELSE
{statements}]
END SELECT
Returns
Parameters
Remarks
The following CASE tests are supported:
Test |
Description |
CASE Value |
SelectExpression will be compared to Value for equality |
CASE Value1 TO Value2 |
SelectExpression must be between Value1 and Value2 |
CASE > Value |
SelectExpression must be greater than Value |
CASE >= Value |
SelectExpression must be greater or equal to Value |
CASE < Value |
SelectExpression must be less than Value |
CASE <= Value |
SelectExpression must be less or equal to Value |
CASE = Value |
SelectExpression must be equal to Value |
CASE <> Value |
SelectExpression must be different than Value |
CASE Value1, Value2, ... |
SelectExpression must be one of the listed values |
Restrictions
See also
Examples
© 2004-2008 thinBasic. All rights reserved. | Version 1.7.0.0 | Web Site: http://www.thinbasic.com |