types and functions

Blitz3D Forums/Blitz3D Beginners Area/types and functions

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.

If you're going to be doing the same thing to each one, by all means, do it the first way.

Generally you would put custom type pointers into an array if you wanted them indexed, so that you could reference a single, particular one in O(1) time. But if you're doing something to all of them, then both ways are O(n).

And in fact, 4 cars is virtually nothing. Even if you wanted to reference a single car, to loop through 4 to find that car is practically the same.

So in this case, I would say to make it easy on yourself, the programmer.