On 12/8/06, Atte André Jensen
Did you look at array.cap()?
Yep, but array.cap() gives me the capacity of the array, not the size. Maybe a "size" method this is only a feature for growable/dynamic arrays (which would also be dreamy - aahhh push and pop). In fact, it would be nice if a ChucK array was not a fixed-length data structure. Currently, if I would like to find out how many members of an array are currently occupied (for imposing limits on member and such), I must keep an int variable as I add members to the array. It is really only in this way that I have found to loop over only the members of the array that are actually filled with something. It is always possible to write a wrapper class to abstract some of this functionality... Have I missed something in the way that the ChucK array has been implemented?