Types - finding a particular one

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

The Forum Archive is locked. These are the original blitzbasic.com forums, kept so their posts can still be read and searched. No new topics, replies or edits can be made here. To join the conversation, 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