Skip to main content

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

Parameters

NameTypeCommentKind
collectionToAppendICollectionThe collection to be appendedinput

Code

Declaration

METHOD appendCollection :CNM_ReturnTypes.SingleExecutionResult
VAR_INPUT
(*The collection to be appended*)
collectionToAppend :ICollection;
END_VAR