Next: Loops, Previous: Object type determination, Up: Syntax
Kite uses the decide
construct (analogous to C/C++'s switch
statement)
to allow developers to conditionally execute code. Example:
decide [ condition1 [ ... ], condition2 [ ... ], ... true [ ... ] ];
Each condition is separated by a comma, where condition is any statement that evaluates
to a Boolean value. true
is used to denote code that should be executed when
none of the other conditions match. Each condition is evaluated one-by-one, with the
rest short-circuited once the first matching condition is found (no falling through
like in C/C++).