Types/Lists can change the number of items, simply by creating new instances or deleting instances.
Arrays are able to be re dimensioned but this loses all information in the array. Arrays also are global in blitz.
Banks are another feature of blitz which are very powerful.
Types allow collections of properties for an 'object' and of different data types.
So you could have a type instance (like a struct in c) which has fields for 'name$' as a string, 'hitpoints' as an integer and 'radius#' as a float for example.
In an array the data type is declared for the whole array. So using the example above you would need an array of type string, integer and float - 3 arrays in total.
Types are flexible and easy to use and the performance hit on PCs greater than a Pentium 2 is negligible when compared with Arrays (from my own experience).
If you were doing a game like space invaders you would probably use a type for the space ships (friendly & enemy) with fields like "x,y,lives,animationframe,name$"
In my own code I rarely use arrays but that is just my own preference. Some people use arrays rather than types. Whatever you find easiest I guess.
Arrays are able to be re dimensioned but this loses all information in the array. Arrays also are global in blitz.
Banks are another feature of blitz which are very powerful.
Types allow collections of properties for an 'object' and of different data types.
So you could have a type instance (like a struct in c) which has fields for 'name$' as a string, 'hitpoints' as an integer and 'radius#' as a float for example.
In an array the data type is declared for the whole array. So using the example above you would need an array of type string, integer and float - 3 arrays in total.
Types are flexible and easy to use and the performance hit on PCs greater than a Pentium 2 is negligible when compared with Arrays (from my own experience).
If you were doing a game like space invaders you would probably use a type for the space ships (friendly & enemy) with fields like "x,y,lives,animationframe,name$"
In my own code I rarely use arrays but that is just my own preference. Some people use arrays rather than types. Whatever you find easiest I guess.