Chris> GTK+ Tutorial has scribble.c code that has many subroutines that
    Chris> are tied to events.

    Chris> Many of these are static.  Please explain what static gives you
    Chris> in C.

In a small standalone application like scribble it doesn't really buy you
much, but if you are writing a more significant application, using static to
restrict the visibility of functions only used local to the file they are
declared in reduces global namespace pollution and thus the chance for
conflicts at compile or link time.  Just to provide a dumb example, suppose
you named an event handler "connect".  If it's not declared static it will
conflict with the standard library function of the same name.

-- 
Skip Montanaro ([EMAIL PROTECTED] - http://www.mojam.com/)
_______________________________________________
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list

Reply via email to