{{getMsg('Help_YouAreHere')}}:
/
{{page.title}}
{{page.title}}
{{$root.getMsg("downLoadHelpAsPdf")}}
{{helpModel.downloadHelpPdfDataStatus}}
Select statements
The Select statement branches on a given expression value with specified constants and take action according to the first constant to match. The statements in the optional Default branch will be executed if none of the specified Case constants matched the expression value.
Usage:
Select //(expression)// Case constant1 : //(statement)// Case constant2 : //(statement)// Default: //(statement)//
Examples:
// Select with single statements Select {Orders.quantity} Case 10 : "ten" Case 15 : "fifteen" Case 20 : "twenty" Default : "unknown"
// Select with multiple statements local numbervar level; Select {Orders.quantity} Case 10 : (level := 1; "ten") Case 15 : (level := 2; "fifteen") Case 20 : (level := 3; "twenty") Default : (level := 4; "unknown")
Notes:
The select statement is not explicitly terminated by any "end select". Therefore it ends automatically if any matching the select syntax is found. So if you want to use more than one statement for a "case" you'll have to use parenthesis for this "case".