Zurück Weiter Bearbeiten Umbenennen Rückgängig Suchen Verwaltung
Enumerations are managed in the _next
This method is called at the start of the enumeration, and at each loop iteration, to
retrieve the first or the next element.
gives you a pointer to a enumeration buffer. Use this buffer to store the state of the enumeration. You can store up to 16 bytes into this buffer.
Note that the buffer is initialized with zeros at the beginning of the enumeration,
so that you can detect when _next
is called at the start of the enumeration.
When the end of the enumeration is reached, use the GB.StopEnum
function to warn the interpreter,
and returns immediately from the implementation function.
Updating Enumeration State
If you destroy one element of the enumeration, you must use GB.ListEnum
update the state of current iterators.
If you entirely clear the enumerable object
, then you must use GB.StopAllEnum
all current iterators.