![]() ![]() |
|
MATBUILDThe MATBUILD statement is used to create a dynamic array out of a dimensioned array.
COMMAND SYNTAXMATBUILD variable FROM array{, expression1{, expression2}} {USING expression3}
SYNTAX ELEMENTSvariable is the jBC variable into which the created dynamic array will be stored. Array is a previously dimensioned and assigned matrix from which the dynamic array will be created. expression1 and expression2 should evaluate to numeric integers. expression1 specifies which element of the array the extraction will start with; expression2 specifies which element of the array the extraction will end with (inclusive). By default, each array element is separated in the dynamic array by a field mark. By specifying expression3, the separator character can be changed. If expression3 evaluates to more than a single character, only the first character of the string is used.
NOTESWhen specifying start and end positions with multi-dimensional arrays, it is necessary to expand the matrix into its total number of variables to calculate the correct element number. See the information about dimensioned arrays earlier in this chapter for detailed instructions on calculating element numbers.
EXAMPLES
|