Best bet is to define your own user attribute fields in your record
schema. Then you have total control and no current or future
conflicts.

"Stadin, Benjamin" <[EMAIL PROTECTED]> wrote in
message news:[EMAIL PROTECTED]
> Hi,
>
> I'm using batch operation on several hundred records. I want to
store some information in the record attributes, because I have to set
flags there anyway and it'd be faster.
> But I found that it doesn't seem to possible to use the high bits of
the record attributes. Is that true, and is there a way to use them
anyway?
>
> Example code:
>
> DmRecordInfo(MemoDB, recRow, &attr, NULL, NULL);
> // UND verknuepft. falls attr wordcount erreicht wird secret bit
zurueckgesetzt
> // High Byte von attr als treffercounter verwenden
> // hiB ist nochmal augeteilt in 2*4Bit (wordRev, matches).
> hiB = attr>>8; // hihgh byte von attribute = linkes byte
> loB = attr&0xFF;
> wordRev = hiB>>4; //ersten 0..3 bit von attr
> matches = hiB & 0x000F;
> // wordRev ist Nr. des im Record zuletzt gesuchten Worts, um
sicherzustellen,
> // dass matches nicht erhoeht wird wenn gleiches wort doppelt im
datensatz vorkommt
> if ((wordRev == z) && (matches == z))
> {
> ++matches;
> ++wordRev;
> wordRev = wordRev<<4;
> hiB = 0;
> hiB |= wordRev;
> hiB |= matches;
> hiB = hiB<<8;
> attr = 0;
> attr |= loB;
> attr |= hiB;
> // attribute is here e.g. 0x1150 DmSetRecordInfo (MemoDB, recRow,
&attr, NULL);
> }
> DmRecordInfo(MemoDB, recRow, &attr, NULL, NULL); // Here the record
attributes is 0x0050 ....
>
>
> Greets,
> Benjamin
>



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

Reply via email to