And of course, you can "unpack" a packed database record into a struct and
then access ints just fine.
For example:
unsigned short frame_crc;
MemMove(&frame_crc, beaconBuf+pos-2, sizeof(frame_crc));
// now can read the short in frame_crc, even if it happens to be out
of alignment in the packed record
==-
John Schettino author of
Palm OS Programming For Dummies, http://schettino.tripod.com
-----Original Message-----
From: Laurence Lundblade [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 27, 1999 12:26 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: reading from odd address
There sure are! Reading characters at odd addresses is no problem, but
integers must be at even addresses.
LL
At 02:09 PM 12/27/99 -0600, Chris Yourch wrote:
>Are there any processor alignment issues with the Palm while trying to read
>a database memory block? I will be storing my database records without
>using a struct and I lay down each field in the memory block. I do have
>some byte sized fields and string fields that end on odd memory addresses.
>
>Thanks,
>Chris
>
>
>RIA Group
>[EMAIL PROTECTED]
>
>
>
>