Type Arrays.
Blitz3D Forums/Blitz3D Programming/Type Arrays.
| ||
How can I do these in Blitz? I can't seem to declare them, and it looks like I can't use a bank to do them either, but I need to use something like this, otherwise I'm floating around with loads of variables! Sorry about this - I'm a C coder originally, so the transition to Blitz is proving to be a little problematic! :) |
| ||
I'm a C coder myself, welcome to Blitz 3D. :) Is this what you were looking for? http://www.blitzbasic.com/codearcs/codearcs.php?code=417 |
| ||
There are arrays of types (as above) or type arrays. type arrays |
| ||
Type car Field x End Type Dim cars.car(200) For loop = 0 To 20 cars(loop) = New car cars(loop)\x = Rnd(5,10) Next For loop = 0 To 20 Print cars(loop)\x Next MouseWait End |
| ||
Nice one, fellas! Thanks! :) |