String Expressions |
DEVELOPER |
The evaluation of a string expression results in an alphanumeric or wide value. A string expression can be any of the following:
A constant
A variable
An operation
A series of constants, variables, and operations joined with string operators.
Concatenation (+) is the process of joining two or more strings together in the format:
operand1 + operand2 + . . . + operandn
where:
operand1 . . . operandn are any valid alphanumeric or wide constants, variables, expressions, or operations.
The resulting value is of the same type as the operands. When concatenating strings, the result of the concatenation will either be of type short alpha (for example, a string defined as less than or equal to 250 bytes in size), or of type long alpha (for example, a string defined as greater than 250 bytes in size). The only time a concatenation will yield a long alpha is when the concatenation is immediately and explicitly assigned to a long alpha string. Any other operations (even intermediate operations) will cause the string to be truncated to a short alpha.
Assume: |
|
C=A+B |
|
C=(ALPHA(WIDEVAL(A+B)) |
|
D=A+B |
|
|
|
CITY + ',' + STATE |
|
$A = 'XYZ', $B = '789' |
|
ORDER-NO is an alphanumeric file variable with a length of 8 |
Topic ID: 520010