/usr/share/freemat/help/text/switch.mdc is in freemat-help 4.0-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | SWITCH SWITCH Switch statement
Usage
The switch statement is used to selective execute code
based on the value of either scalar value or a string.
The general syntax for a switch statement is
switch(expression)
case test_expression_1
statements
case test_expression_2
statements
otherwise
statements
end
The otherwise clause is optional. Note that each test
expression can either be a scalar value, a string to test
against (if the switch expression is a string), or a
cell-array of expressions to test against. Note that
unlike C switch statements, the FreeMat switch
does not have fall-through, meaning that the statements
associated with the first matching case are executed, and
then the switch ends. Also, if the switch expression
matches multiple case expressions, only the first one
is executed.
|