ListIterator.more Method [AX 2012]
Determines whether the list iterator points to a valid element.
The following example uses the ListIterator.more method to check whether there are more elements in the list and then runs through the while loop, which prints the values of all the elements in the list.
{
List il = new List(Types::Integer);
ListIterator it;
int i;
// Add some elements
for (i = 1; i <= 10; i++)
{
il.addEnd(i);
}
// Traverse the list
it = new ListIterator(il);
while (it.more())
{
print it.value();
it.next(); // Skip to the next element
}
pause;
}
Community Additions
ADD
Show: