EXAMPLE *thing; // The data type the list contains. Used to step through the loop.
ITERATOR( iter ); // Macro creating an iterator named iter.
start_loop( iter, some_list ); // Set up the iterator to loop through some list.
while( ( thing = Next( iter ) ) ) // Grabs the next valid element in the list, until the end (null).
{
(stuff)
}
end_loop( iter ); // Finishes the iterator, and performs some pruning on the list if possible.
EXAMPLE *thing;
loop_list( iter, some_list, thing )
{
(stuff)
}
:thinking: