How to have dynamic sized arrays in types

Blitz3D Forums/Blitz3D Programming/How to have dynamic sized arrays in types

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.

How do I create a linked list inside a type?

Just having 2 variables, where the first points to the first TWareType and the second that points to the last TWareType, isn't really an option, because a station could hold only 2 waretypes, the second one and perhaps the 30th one.
If the 2 vars would point to those 2nd and 30th TWareType, then that station would hold all TWareTypes that come in between too.

Or do you mean, create a TWare type (not a TWareType), let this TWare type have only 3 fields (previous, next and value (= pointer to the TWareType)) and "link" them together, setting up the "previous" and "next" fields as required, to form a chain of TWare type-instances?

And let the station have a pointer to the first TWare type-instance (the start of the chain)?

Edit: Why didn't I think of that?
I remember someone doing this, while reading your post (and replying here).

I've never done this before myself, but thanks that's a great way.
Now all I have to do, is create the system to do all this.
Thanks.