_next

[ Static ] Public _next ( ) [ As Datatype ]

The _next method is called when the interpreter uses the FOR EACH ... IN instruction to enumerate the object.

The method takes no parameters, and may return an enumerated data.

The method can be static. Then, the class will be enumerable, not the object.

This method can return nothing. Then, you will enumerate the object with a FOR EACH instruction, without the IN part.

Inside the _next method implementation, you will use the Enum class to manage the enumeration:

  • Enum.Index, a property to store the enumeration index. This is a variant property, initialized with NULL when the enumeration starts.

  • Enum.Stop, a method to halt the enumeration when it is finished.

  • The Enum class can be enumerated when you need to stop all enumerations of the current object.

See also