At 08:27 2002-11-24 -0800, you wrote:
From: "Ben Combee" <[EMAIL PROTECTED]>
>
> In short, the "static" keywords are used to keep CodeWarrior from
> complaining about the lack of prototypes for these functions.

Well, I guess that's one way of looking at it--to shut the compiler up! :)
But the compiler is complaining because it either wants a prototype (showing the intention to export the function to other modules) or it wants a static keyword (making sure the global namespace isn't polluted).

The other way of looking at it is that functions local to a compilation unit
should _always_ be static, for exactly the same reasons that globals are
discouraged--to limit scope (which helps to limit bugs).
Agreed.

--
Ben Combee <[EMAIL PROTECTED]>
CodeWarrior for Palm OS technical lead
Palm OS programming help @ www.palmoswerks.com


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

Reply via email to