getNewLinkedList
Short summary
A method to generate a new LinkedList.
- Return type: CNM_ReturnTypes.SingleExecutionResult
Parameters
| Name | Type | Comment | Kind |
|---|---|---|---|
| list | CNM_CollectionInterfaces.ILinkedList | the created linked list | output |
Code
Declaration
METHOD getNewLinkedList :CNM_ReturnTypes.SingleExecutionResult
VAR_OUTPUT
(* the created linked list *)
list :CNM_CollectionInterfaces.ILinkedList;
END_VAR
VAR
newList :POINTER TO LinkedList;
END_VAR
Implementation
getNewLinkedList := CNM_ReturnTypes.SingleExecutionResult.ERROR;
newList := __NEW(
LinkedList()
);
IF (newList <> 0) THEN
list := newList^;
getNewLinkedList := CNM_ReturnTypes.SingleExecutionResult.SUCCESS;
END_IF