From: "Mike Shubeck" <[EMAIL PROTECTED]>

>     RecordSize=(len=StrLen(Data.Field1))+((len>0)?1:0);

1) There's no need for the ?: operator:

   RecordSize=(len=StrLen(Data.Field1))+(len>0);

2) Variable names like Field2, Field3 are a "smell." Why not use an array
and a loop?

3) I'm not at all certain this is even legal C code. You're changing len and
evaluating it in the same expression. Which side of the + operator should be
evaluated first? You're lucky your monitor didn't blow up. :)

4) Are you sure you don't want to store the null byte at the end of empty
fields? How will you know when a field is empty when you read it back again?


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

Reply via email to