Dim inside Type possible?
Blitz3D Forums/Blitz3D Programming/Dim inside Type possible?| 
 | ||
| Can we declare something like 
Type chair
    Dim variables (10)
End Type
 | 
| 
 | ||
| IIRC, you can't use standard arrays - you have to use Blitz Arrays. Type myType Field myArray[10] End Type Blitz arrays are single-dimension only, so no myArray[10,10]. I'm sure there's some other limitation too. | 
| 
 | ||
| I think you can't change the size of a Blitz array once it's defined if I remember correctly. | 
| 
 | ||
| Yep....and you can't set the size at runtime either.....my preference is to use a bank in the event I need to use a blitz array. | 
| 
 | ||
| Do you actually need to use the array index number for fast look up - or just want a list of variables (possibly of infinite size) attached to the type? Its possible to mis-use type collections to have an infinite group of objects owned by a parent object. | 
| 
 | ||
| I use an array having a fixed number of elements | 
| 
 | ||
| Thanks for the extra info guys |