Language Constructs¶
va.foo = 5 + va.bar
Annotation expression. Bind variable
va.foo
to the result of evaluating5 + va.bar
.if (p) a else b
The value of the conditional is the value of
a
orb
depending onp
. Ifp
is missing, the value of the conditional is missing.if (5 % 2 == 0) 5 else 7 7
if (5 > NA: Int) 5 else 7 NA: Int
let v1 = e1 and v2 = e2 and … and vn = en in b
Bind variables
v1
throughvn
to result of evaluating theei
. The value of the let is the value ofb
.v1
is visible ine2
throughen
, etc.let v1 = 5 and v2 = 7 and v3 = 2 in v1 * v2 * v3 70