Skip to main content

current

Short summary

This property returns the current element which the iterator points to.

*Attention: If current is used multiple times between two iterate calls, current is only guarenteed to return an object that is actually in the list for the first call to current that happens immediatly after the first iteration call.

**Example: **

WHILE(iterator.moveNext())DO
//current is valid
iterator.current.foo();
//current is valid
fooobject := iterator.current;
list.remove(fooobject);
//still returns fooobject but is not in the list
iterator.current.foo();
END_WHILE

Code

Declaration

PROPERTY current :CNM_AbstractObject.IObject