This seems to be what I was looking for. I will try it out pronto. Thank you both for the help ;)
Jim "John Marshall" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > On Wed, Feb 26, 2003 at 12:47:08PM -0800, Jim Duffy wrote: > > If my struct is 40 bytes long and the total of all the packed strings is 91, > > the I need to move 131 bytes into the record. But since a UInt16 is 2 bytes > > long, it seems I can only move it in increments of 2. > > > > ie: arrayP += 65; > > This would move it 130 bytes, but I would still be off by one byte.. > > Don't think of it as a UInt16, and don't access it in the packed record > via a UInt16 *; think of it as an integer encoded in two bytes in m68k > format, and access it with something like > > unsigned char *packedP = <start of record>; > > packedP += 131; > > UInt16 first = (packedP[0] << 8) | packedP[1]; > > John "...a different emphasis from Ben's answer :-)" > > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
