MOVE - String Expression to DIM Field
The MOVE string expression to DIM field instruction combines multiple PL/B string operands within a single instruction and places the resulting string in a DIM destination field. The + operator concatenates string operands. The instruction uses the following format:
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
string
Required. A string operand permitted by PL/B string-expression syntax. String operands may include DIM data, INIT string data, string literals, and NCHAR data where supported by the expression.
+
Required. Required between string operands. The string concatenation operator. Operand2 is appended to Operand1.
sep
Required. A comma or one of the following prepositions: BY, TO, OF, FROM, USING, WITH, IN, or INTO.
dest
Required. A DIM Character String Variable that serves as the destination operand.
Flags Affected: EOS
Note the following:
MOVE evaluates the string expression from the source operands and places the resulting string in {dest}. The source operands remain unchanged.
|
|
|
|
|
|
|
|
The + operator performs string concatenation. String operands are concatenated in expression order. Additional parentheses may be used to group nested string expressions.
MOVE evaluates the string expression from the source operands and places the resulting string in {dest}. The source operands remain unchanged.
|
|
|
|
|
|
|
|
When a DIM variable is used as a source operand, only its Logical String participates in the expression. The Logical String begins at the Form Pointed character and continues through the Length Pointed character. Characters before the Form Pointer and characters beyond the Logical Length do not participate.
The complete string expression must begin with an open parenthesis and end with a close parenthesis. Any additional parentheses must be balanced. Nested expressions are evaluated beginning with the innermost parenthesized expression and working outward.
After the string expression is evaluated, transfer into {dest} follows the character-string destination rules. Transfer begins at the first physical character of {dest}. The Form Pointer of {dest} is set to one (1), and the Length Pointer is set to the last character transferred.
If {dest} is too small to contain the complete evaluated string result, characters are transferred until {dest} is full and the EOS Condition Flag is set.
|
|
|
|
|
|
|
|
|
|
|
|
A NULL string operand contributes no characters to a string concatenation expression. Non-NULL operands are concatenated normally. If all operands in the expression are NULL strings, the evaluated result is a NULL string. When the evaluated result is NULL, no characters are transferred to {dest}; the destination Form Pointer is set to zero (0), and the destination Length Pointer remains unchanged. This is the same destination behavior as a normal MOVE of a NULL string to a DIM field.
String literals may be included directly in the expression and are concatenated in the same manner as other string operands.
|
|
|
|
String comparison operators produce numeric logical results and are not string-producing operations for this MOVE form. LIKE, REGEX, and NOCASE are structured-logic operators and are not supported as operators in a MOVE string expression.
The instruction may be continued on multiple lines only when the compiler is operating in Sunbelt mode. When the compiler is in ANSI mode, continuation lines are not supported.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
In Sunbelt mode, the preceding continued statement is valid. The same continuation syntax is rejected in ANSI mode as NON-ANSI format..
![]() |