The simplest kind of collection is an array:
For Local k=EachIn a
Each iteration of such a loop will assign the next array element (starting with element 0) to the index variable before executing the body of the loop. This allows you to visit each array element in turn.
It is also possible to create your own kind of collection with user defined types.
To do this, you must create a user defined type with a method named
ObjectEnumerator which takes no parameters and
returns an object. The object returned by this method must itself have the following methods:
Method HasNext:Int() ' returns true if there's a next object
Method NextObject:Object() ' returns the next object
Local list:TList = New TList
For Local t:String = EachIn list