Control Flow
Conditional Statements
if a < b {
a
} else {
b
}Syntactically, a conditional statement requires the following elements:
ifkeywordIn braces, code block of first option
elsekeywordIn braces, code block of second option
Terminating
;
(Note further that ifand else are always paired—there is no standalone if.)
Branching Statements
Besides simple conditional statements, Jock supplies a type-based dispatch statement, match, and a value-based dispatch statement, switch.
Last updated