Skip to main content

getNewLinkedList

Short summary

A method to generate a new LinkedList.

Parameters

NameTypeCommentKind
listCNM_CollectionInterfaces.ILinkedListthe created linked listoutput

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