On Fri, 2 Aug 2002, Frank Heckenbach wrote:
Preben Mikael Bohn wrote:
Will sizeof(somestring) always be 9 bytes larger than high(somestring)/getstringcapacity(somestring)? Or is it just in one case I have found this...
A string contains Capacity and Length (4 bytes each on a 32 bit platform) and an extra character for the #0 when converting to CString.
On ix86 platforms the allocation is rounded up to a multiple of 4 bytes. Thus string( 1 ) is 12 bytes, not 10. Only significant if you have a lot of strings and limited memory.
Russ