if cond then foo(); elsif cond then bar(); else baz(); end // if's are expressions and can yield the value of the last expression in each branch var int x = if y > z then y + 1 else z end ;