Please note that the recommended version of Scilab is 2023.1.0. This page might be outdated.
See the recommended documentation of this function
select variable case value1 then instructions 1 case value2 then instructions 2 ... case valuen then instructions n [else instructions] end
variable which value to be analyzed.
- value1, ..., valuen
variablefor which there are appropriate instruction blocks
instructions 1, ..., instructions n.
block of valid instructions.
The only constraint is that each
thenkeyword must be on the same line as corresponding
casekeyword (or use a continuation mark, see dot).
"then"can be replaced by a carriage return or a comma.
instructions1are executed if
According to the Code Conventions for the Scilab Programming Language it is recommended:
Start each statement on a new line.
Write no more than one simple statement per line.
Break compound statements over multiple lines.
For example, use:
Warning: the number of characters used to define the body of any conditional instruction (if while for or select/case) must be limited to 16k.
|Report an issue|
|<< return||Control flow||then >>|