This table shows the valid combinations of types when the operator is + or -. To understand the calculation of the expression A + B, find the intersection of the row for A's type and the column for B's type. Consult the numbered notes for the details of casting or conversion.
|
|
|
|
|
|
|
|
Other (text) |
|
||||||||
|
3 |
3 |
3 |
5 |
5 |
5 |
X |
1 |
|
X |
3 |
4 |
5 |
5 |
5 |
X |
1 |
|
X |
4 |
3 |
X |
5 |
5 |
X |
1 |
|
5 |
5 |
X |
2 |
2 |
2 |
X |
1 |
|
5 |
5 |
5 |
2 |
2 |
2 |
X |
1 |
|
5 |
5 |
5 |
2 |
2 |
2 |
X |
1 |
|
X |
X |
X |
X |
X |
X |
X |
1 |
Other (text) |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
X indicates that a casting, promotion or conversion is not supported. The Pega Platform reports an error.
+
, performs Java String concatenation (result is of mode Single Value
). The minus operator (-
) is not permitted.Integer
> Double
> Decimal
until both operands have same type, then perform operation. Result is of the promoted type. (Converts directly to the target type without performing intermediate conversions.)+
operator is not permitted. The -
operator converts operands to Decimal
and performs the operation, yielding Decimal
number of days and fraction of day.+
operator converts operands to Decimal
and performs the operation, yielding a DateTime
with GMT assumed. The - operator is not permitted.Decimal
and performs the operation, yielding a Date
(rounded), Time of Day
or DateTime
(depending upon type of original non-numeric operand)