At 4:13 PM -0700 2001/07/18, Keith Rollin wrote:
>It seems to me that that would make coding somewhat more difficult. You'd have stuff 
>like the following all over the place:
>
>       UInt32 dummy;
>       if (canAcceptNULL)  // Initialized earlier.
>               exists = FtrGet (creator, number, NULL) == errNone;
>       else
>               exists = FtrGet (creator, number, &dummy) == errNone;

Well, Paul's suggestion does make sense when all you need to know is the existence (or 
non-existence) of the feature, rather than the value of that feature if it exists. 
Passing NULL for the destination avoids that extra unused local variable. But Keith's 
point makes good sense w.r.t. running such code on older versions of the Palm OS which 
don't support passing NULL for the destination parameter. So...

The best way to solve this problem is probably to wrap FtrGet with your own version of 
that routine which allows you to pass NULL if you want.

Regards,

Jim Schram
Palm Incorporated
Partner Engineering


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