Posted: 17th Jun 2007 16:09
Is there any way of deleting types in Db-Pro.I have been using blitz3D(I much prefer Db-Pro)and found that you could do this.Also is there any way of looping through types similar to B3d's for each loop.
Posted: 17th Jun 2007 16:12
Why would you delete a type?

Don't you make an array of type and delte an element in the array?
Posted: 17th Jun 2007 16:17
I meant delete an instance of a type,so that when you loop through the array that position would come up as a null value.
Posted: 17th Jun 2007 16:31
Just have a value you can set 1/0 in your type

Not exaclty what you want but it should do the job of being null and still hold it's position in the array.
Posted: 17th Jun 2007 19:34
Arrays are dynamic in DBP, so you can delete elements. There are various different ways to do it (queues / stacks), so check out the help and see which method suits you.
Posted: 18th Jun 2007 15:36
I think there's a little confusion here. In Blitz I believe that you can use a type as a variable or hold a pointer to the type in a variable or an array. DBPro doesn't have this last one - it holds the type directly in the array itself.

Basically what everyone is saying here is that you can simulate the array system by including an 'in-use' flag in your types, and scanning your array for items that have a zero in-use flag.