Types - finding a particular one

BlitzPlus Forums/BlitzPlus Beginners Area/Types - finding a particular one

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.

Make an array (using Dim)of your types an reference them by an index number (instead of using a loop with Each) as follows:

Don't forget to free them all at the end.

Type TheType
Field A%
Field B$
End Type

MAX_TYPES = 10

Dim Types.TheType(MAX_TYPES)

For i = 0 To MAX_TYPES-1
Types(i) = New TheType
Next

Types(3)\B = "hello"
Notify Types(3)\B