Skip to main content

removeObjectAt

Short summary

This method removes the element at the given index. Will shift the remaining data to the left (no empty space in list) List Length will be decremented.

Return: SingleExecutionResult.SUCCESS: Element removed from index SingleExecutionResult.ERROR: index out of bound, no object removed

Parameters

NameTypeCommentKind
objectCNM_AbstractObject.IObjectthe removed objectoutput
indexUDINTthe index to remove the object frominput

Code

Declaration

METHOD removeObjectAt :CNM_ReturnTypes.SingleExecutionResult
VAR_INPUT
(*the index to remove the object from*)
index :UDINT;
END_VAR
VAR_OUTPUT
(*the removed object*)
object :CNM_AbstractObject.IObject;
END_VAR