This documentation was styled with a demo skin from the Premium Pack 4 add-on for Help & Manual. The contents of the skin are encrypted and not configurable. You can only publish HM projects with this skin. You cannot edit it or change it.
This version is copyright and may only be used for local testing purposes. It may not be distributed.
Please purchase the full version of the Premium Pack to get the configurable skins and remove this notice. The package will also include the Toolbox configuration utility for Premium Pack skins.
Description
Control program flow based on the value of an expression.
Syntax
SELECT CASE AnyStringOrNumericExpression
'<<<NO CODE is permitted here
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
No code is permitted between a SELECT CASE and the very first CASE statement.
Empty SELECT CASE/END SELECT (without any CASE statement defined inside the block) will generate runtime error.
See also
Examples