CASE (expr) case1;line1, case2;line2 [,...]
expr - is a numeric or string expression.
casen - is a numeric expression if expr is numeric or
is a string expression of expr is a string.
linen - is a line number or line label.
The CASE statement allows multiway branching to any line within the same procedure or function depending on the matching of one of a number of conditions.
The test expression expr is evaluated and then sequentially compared to the values case1, case2, etc. When a match is found, control then branches to the line corresponding with the line number or line label following the case value. If no match is found, execution will continue with the next statement after the CASE statement.
NOTE: The CASE statement cannot be used in within raster models.
Example:
CASE (command) "HELP"; help_cmd, "STOP"; stop_cmd
© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.