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
- Return type: CNM_ReturnTypes.SingleExecutionResult
Parameters
| Name | Type | Comment | Kind |
|---|---|---|---|
| object | CNM_AbstractObject.IObject | the removed object | output |
| index | UDINT | the index to remove the object from | input |
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