Add or subtract numerical values.
The following construct(s) refer to this construct:
The AdditiveExpr
provides the usual arithmetic operations
for adding and subtracting numerical values. Each operand is
atomized so that
it is either a single atomic value or an empty sequence. If one of the operands
is atomized to an empty sequence, the result of the operation is also an empty
sequence.
A sequence of expressions that consists of string and numeric literals:
(59 - 17)
As integer literals the operands are already atomic values and of valid
type for the operator. Tamino returns the expected result 42
.
Compute the years, in which all patients turned 18 years:
for $a in input()/patient/born return $a + 18
The variable $a
is bound to the
born
element. After atomization the addition can be
performed.