>Subject: Static Global
>From: Wang Yan-FYA009 <[EMAIL PROTECTED]>
>Date: Fri, 9 Mar 2001 16:47:44 -0800

>A basic question here: why in those palm sample code that most of global
>variables are declared as static? And also most of those function? Mean to
>be only accessable in one file?

        global  !=  static
        extern  !=  static

This is just a regular C issue, not specific to Palm OS.

PS:  Avoid global variables.  (You're writing in C not COBOL)
        For a variable with global scope, declare it as static and then
        provide functions to read/write it.

Roger Stringer
Marietta Systems, Inc.


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