Click to See Complete Forum and Search --> : Data packing


cksiow
April 3rd, 2001, 11:26 PM
How can we control the data packing of visual basic ?

for instance, if we define the following type

type c
a as integer
b as long
end type

for efficiency, the compiler will actually allocate four byte instead of two byte to a in physical memory and b start at offset 4.

how can we ask vb to pack it actually like what we declare, i.e. b should start at offset 2.

I know this can be done in vc using a compiler switch, what about vb ?

thanks.