home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.atari.st
- Path: sparky!uunet!mnemosyne.cs.du.edu!nyx!ilepore
- From: ilepore@nyx.cs.du.edu (Ian Lepore)
- Subject: Re: Bug in Pure-C
- Message-ID: <1992Jul31.191839.5999@mnemosyne.cs.du.edu>
- X-Disclaimer: Nyx is a public access Unix system run by the University
- of Denver for the Denver community. The University has neither
- control over nor responsibility for the opinions of users.
- Sender: usenet@mnemosyne.cs.du.edu (netnews admin account)
- Organization: Nyx, Public Access Unix at U. of Denver Math/CS dept.
- References: <1932@dutiws.tudelft.nl> <DSTAILEY.92Jul30220937@leidecker.gsfc.nasa.gov>
- Date: Fri, 31 Jul 92 19:18:39 GMT
- Lines: 22
-
-
- >Static variables are declared inside functions. Variables declared outside
- >of functions are global. I'm not sure what the compiler is making of your
- >code, but I do know of one use of the "static" keyword outside of functions,
- >and that is in function declarations. In this case, "static" means private,
- >i.e. not accessable to any code outside of the source module in which the
- >function is defined.
-
-
- Static variables appear either inside or outside of functions. When they
- appear outside functions, they work just as you describe for static functions:
- they are private to that source module. (Er, to be picky, they're private
- to the current translation unit.)
-
- The original posting seems to describe a genuine compiler bug; it isn't
- a matter of usage error in the way the static variables are declared.
-
-
- --
- - Ian
- (void *) where prohibited by law
-
-