In article <90800@palm-dev-forum>, [EMAIL PROTECTED] says...
> 
> Hi all,
> In one of the sample apps, a variable is defined as static in the Event
> Handler procedure.
> 
> does this mean that it is available throughout the entire procedure or just
> in the event handler???
> In other words, is this the same as defining it as static at the top of the
> procedure?

static variables in a function are only visible inside the function in 
which they are declared.  However, they act like global variables, and 
values set in one invokation of the function will remain in later calls.

If you declared it as static at the top of the source file, it would be 
a true global variable, but only visible to functions in that source 
file, not other ones you compile.
-- 
Ben Combee <[EMAIL PROTECTED]>
CodeWarrior for Palm OS technical lead
Get help at http://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