Ivan Shmakov wrote:

>  >> Doesn't C require an explicit initial value for `initialized' here?
> 
>  > Well, as it is a static variable it will be initialised to zero.
> 
>       Oh, never knew C has such a feature.  (Still, it may make sense
>       to add an explicit initializer for the sake of clarity.)

If you add an explicit initialiser, the variable will be placed in the
data segment.

Variables which are implicitly initialised to "zero" (i.e. any global
variables and "static" local variables lacking an explicit
initialiser) are placed in the BSS segment. As the entire BSS segment
is zero, its contents don't need to be stored in the resulting binary
file.

-- 
Glynn Clements <[EMAIL PROTECTED]>
_______________________________________________
grass-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to