On Wed, Jul 21, 2010 at 03:04, theo <[email protected]> wrote: > José Mejuto wrote: >> Had you tried SizeOf(TTestarray) ? > > Good idea. Now I can see that the theory is right. > for: TTestarray = array [1..100] of ttest; > It goes down from 400 to 25 (using bitpacked). > > Jonas Maebe wrote >> Uses new(lMask) instead, then the compiler will automatically allocate > the right size for you. > > I don't think this is going to solve my problem. > I need to define the size at runtime. > With > getmem(lMask, (Elements div 4) +1); > this should be possible, right? >
BTW, I think that bitpacked should be extended to support dynamic arrays -- it would be useful for bit vectors, for example. -- Alexander S. Klenin _______________________________________________ fpc-devel maillist - [email protected] http://lists.freepascal.org/mailman/listinfo/fpc-devel
