Problem with Types ... Guru needed please!

Blitz3D Forums/Blitz3D Programming/Problem with Types ... Guru needed please!

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.

Type evnt
	Field ID
	Field a
	Field b
End Type

Dim eventlist.evnt(5)

For i = 1 To 5

	eventlist(i) = New evnt

	eventlist(i)\ID=i
	eventlist(i)\a = i
	eventlist(i)\b = i * 10	
		
Next

For i = 1 To 5

	Print "Eventlist " + i + ":"
	
	For eventlist.evnt(i) = Each evnt
		If eventlist(i)\ID=I
			Print eventlist(i)\a
			Print eventlist(i)\b
		EndIf
	Next

	Print "---"

Next

WaitKey()


For each always count all the records of the type.