EGL offers two concatenation operators in addition to the
plus sign.
You can use the following operators for concatenation:
- ::
- This operator (two colons) converts simple, assignment compatible
types to string and concatenates them; the operator can also append
an element to an array. Variable length null elements are ignored;
fixed length null elements are considered to be all spaces. If both
operands are null, the operator returns null.
- ?:
- This operator behaves the same way as :: except in regard to null
values. If any element in the concatenation has a null value, the
result will be null. This operator allows the migration of the I4GL
|| operator.
- +
- If you use + for concatenation, the left hand side of the expression
determines the type of the result. If the left hand side is a numeric
variable, the result will be a number; if the left hand side is a
text variable, the result will be concatenated text.