getNewArrayList
Short summary
A method to generate a new ArrayList.
Return: SingleExecutionResult.SUCCESS: allocation succesful, output arrayList contains new list
SingleExecutionResult.ERROR: error during allocation, output arrayList is NULL
- Return type: CNM_ReturnTypes.SingleExecutionResult
Parameters
| Name | Type | Comment | Kind |
|---|---|---|---|
| arrayList | CNM_CollectionInterfaces.IArrayList | the created array list | output |
Code
Declaration
METHOD getNewArrayList :CNM_ReturnTypes.SingleExecutionResult
VAR_OUTPUT
(* the created array list *)
arrayList :CNM_CollectionInterfaces.IArrayList;
END_VAR
VAR
newList :POINTER TO ArrayList;
END_VAR
Implementation
getNewArrayList := CNM_ReturnTypes.SingleExecutionResult.ERROR;
newList := __NEW(ArrayList);
IF (newList <> 0) THEN
arrayList := newList^;
getNewArrayList := CNM_ReturnTypes.SingleExecutionResult.SUCCESS;
END_IF