[fpc-devel] sub byte arrays

theo xpde at theo.ch
Tue Jul 20 18:04:25 CEST 2010


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?

Thank you both.
Theo




More information about the fpc-devel mailing list