"Richard Burmeister" <[EMAIL PROTECTED]> wrote in message
news:57300@palm-dev-forum...
>
> > From: amritha aithal
> >
> > Also, why is it that all the functions are declared as
> > static in Palm OS application???Any special
> > significance for doing that????
> >
>
> That really has nothing to do with Palm; it is a C question.
The only Palm significance is that many Palm programmers use the
CodeWarrior compiler, and CW uses the static keyword as a hint to quiet
its "Require function prototypes" warning. With static, the compiler
will allow a function definition without an earlier prototype, since the
function won't be visible outside the file. It gives errors in the
other case so you don't accidentally declare visible functions without
having them listed in an interface header file.
This warning has been in CodeWarrior for a long time. The "Require
function prototypes" is a very useful option, shown in the C/C++
Compiler preference panel.
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/