For each custom type

BlitzMax Forums/BlitzMax Beginners Area/For each custom type

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Global aTypeList:tList = New tList

For N = 1 to 10
  a:aType = new aType
  a.x = rand(0,50)
  a.y = rand(0,20)
  aTypeList.AddLast(a)
Next

For a:aType = EachIn aTypeList
  Print a.x
  Print a.y
Next

Type aType
  Field x:int
  Field y:int
End Type