I do use bit elements in the structure that is storing the "shifted" data.
See below. As you can see I haven't made the switch yet to the new number
types in 3.5. Is that the problem? Changing to the new types is something I
plan to do but I just haven't gotten to that point yet. I thought I would
try to get my program working in CW with the least number of changes to it
first.

One other note, the Byte element is supposed to represent in my program a
number that ranges from zero to 255.

// Here is the structure that a data element gets packed into:
 typedef struct
 {
   unsigned     selected                : 1;
   unsigned     itemtype                : 1;
   unsigned     hidden                  : 1;
   unsigned             sublistID               : 5;
   Byte         bListID;
   UInt         uiNumMaster;
   UInt         uiNumSel;
   UInt         uiTopMaster;
   UInt         uiTopSel;
   UInt         uiFirstMaster;
   UInt         uiFirstSel;
   char                 cpListName[1];       // Actually will be longer than 1.
 }  PackedList;

// Here is the structure that a data element gets unpacked into:
 typedef struct
 {
   unsigned     selected                : 1;
   unsigned     itemtype                : 1;
   unsigned     hidden                  : 1;
   unsigned             sublistID       : 5;
   Byte         bListID;
   UInt         uiNumMaster;
   UInt         uiNumSel;
   UInt         uiTopMaster;
   UInt         uiTopSel;
   UInt         uiFirstMaster;
   UInt         uiFirstSel;
   CharPtr      cpListName; // Name of list. Program will limit to 20
characters.
 } List;

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Aaron
Ardiri
Sent: Saturday, July 22, 2000 6:11 PM
To: Palm Developer Forum
Subject: Re: Database is shifted

  and this also makes sense.. :)) anything you do with bitwise structures
  may be implemented differently internally when compiled..

az.
--
Aaron Ardiri


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to