BBjAPI::copy
Description
In BBj 16.00 and higher, this method copies elements from a BBjVector to a BBj array. In BBj 20.30 and higher, this method can also copy from one BBj array to another.
Syntax
Return Value |
Method |
---|---|
void |
copy(BBjVector source, array target) |
void | copy(array source, array target) |
Parameters
Variable |
Description |
---|---|
source |
A BBjVector or BBj array with values that are compatible with the target array. |
target |
An existing BBj array, specified as ARRAY[] or ARRAY[ALL]. Any array type (ARRAY[], ARRAY$[], ARRAY%[], or ARRAY![]) can be specified. |
Return Value
None.
Remarks
This method copies elements sequentially from the source (vector or array) to the target array, starting at element 0, and ending when either the source or the target ends. Any null() values in the source are interpreted as the default value for the array ("" for string arrays, 0 for numeric and integer arrays, null() for object arrays). The copy will terminate with an error if it hits a source element that is not compatible with the target array. All elements before any error will be copied.
Example
|
Version History
See Also
VECTOR() Function - Convert Array to Vector
See the BBj Object Diagram for an illustration of the relationship between BBj Objects.