Skip to main content

getIndexOf

Short summary​

This method returns ths index of the first object for which isEqual matches.

Return: SingleExecutionResult.SUCCESS: object found SingleExecutionResult.ERROR: object couldn't be found in the list, index is undefined

Parameters​

NameTypeCommentKind
objectCNM_AbstractObject.IObjectthe object to get the index frominput
indexUDINTthe index of the object inside the collectionoutput

Code​

Declaration​

METHOD getIndexOf :CNM_ReturnTypes.SingleExecutionResult
VAR_INPUT
(*the object to get the index from*)
object :CNM_AbstractObject.IObject;
END_VAR
VAR_OUTPUT
(*the index of the object inside the collection*)
index :UDINT;
END_VAR