Ick, Ack, Pffft!

Better use a null byte (0x00) since you must surely be assuming all string
data.  The null is less likely to conflict than any other byte value.

However, if you have a mixed set of numeric and string data and you do not
want to store the numerics as strings then something so simple is not likely
to work well.  In a non-trivial app where you want to minimize the overall
wasted space and at the same time minimize the code-complexity of
determining the field positions in the record you will come to a compromise
using a mix null terminated strings and fixed sized structures (userdefined
stucts or numerics [long, int, byte etc.]).  You might also use the
techniques that the native palm apps use where a bit-flag is used to
indicate which if the possible fields is present in the record (although as
a person whose product must consume other products' palm data, I beg you NOT
to do this!).


-----Original Message-----
From: Frank Nichols <[EMAIL PROTECTED]>
To: Palm Developer Forum <[EMAIL PROTECTED]>
Date: Wednesday, June 07, 2000 2:31 PM
Subject: RE: Number of Fields


>unreasonable, I would use a field separator character such as "|" (which
>character or character sequence depends on the data content and should be
>unique as a separator) and then you can count the separators to find out
how
>many fields are in the record.



-- 
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