appendCollection
Short summary
This method adds all elements of the given collection to the end of this list.
Example: For the list1: A B C and list2: D E F list1 will be A B C D E F after list1.appendCollection(list2). Notice the elements are still in the same order they were before on each subsection.
Return: CNM_ReturnTypes.SingleExecutionResult.SUCCESS: new Container not needed / could be allocated and data was copied
CNM_ReturnTypes.SingleExecutionResult.ERROR: new Container couldn't be allocated, container left unchanged
CNM_ReturnTypes.SingleExecutionResult.ABORTED: NULL object or the list itself was passed
- Return type: CNM_ReturnTypes.SingleExecutionResult
Parameters
| Name | Type | Comment | Kind |
|---|---|---|---|
| collectionToAppend | ICollection | The collection to be appended | input |
Code
Declaration
METHOD appendCollection :CNM_ReturnTypes.SingleExecutionResult
VAR_INPUT
(*The collection to be appended*)
collectionToAppend :ICollection;
END_VAR