Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!wuarchive!udel!haven.umd.edu!wam.umd.edu!dmb From: dmb@wam.umd.edu (David M. Baggett) Newsgroups: comp.sys.atari.st Subject: Re: static globals? Message-ID: <1991May1.020025.15963@wam.umd.edu> Date: 1 May 91 02:00:25 GMT References: <1991Apr30.183034.15773@lsuc.on.ca> Sender: usenet@wam.umd.edu (USENET Posting) Organization: University of Maryland at College Park Lines: 12 Nntp-Posting-Host: cscwam In article <1991Apr30.183034.15773@lsuc.on.ca> jimomura@lsuc.on.ca (Jim Omura) writes: > I've never seen this type of declaration before. Why would you >bother to declare a "global" as a "static"? Is there any point to >it? It doesn't seem to be a problem for the compilers to handle. Technically, only static variables are guaranteed to be automatically initialized to zeros. Also, I think that only _static_ globals can be given initializers, although most compilers seem to accept initialized auto globals as well. That may be an extension, however. Dave Baggett dmb%wam.umd.edu@uunet.uunet.net