Very good point. I modified the code to have the two variables compare against each other.
I need to find a matching record from the databse (by fid and sid pair). If there is a match, I can subtract 1 from the return-value of DmFindSortPosition. However, how do I know that there is in fact no match for fid + sid pair? DmFindSortPosition tells me the next available position. It didn't indicate whether or not a match is found. Am I using the wrong function all together? --- Robert McKenzie <[EMAIL PROTECTED]> wrote: > Just a guess, but because of possible wrapping / > overflow problems, it is always safer to compare two > values with each other rather than to subtract them > and compare with 0. > > I.e. > if (p1->fid < p2->fid) is better than if ((p1->fid > - p2->fid) < 0) > __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
