home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.linux
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!howland.reston.ans.net!paladin.american.edu!darwin.sura.net!cs.ucf.edu!mcampbel
- From: mcampbel@cs.ucf.edu (Mike Campbell )
- Subject: Re: IMPORTANT [BUG in 0.99] Re: [ANNOUNCE]: linux version 0.99
- Message-ID: <mcampbel.725666039@eola.cs.ucf.edu>
- Sender: news@cs.ucf.edu (News system)
- Organization: University of Central Florida
- References: <1992Dec19.222324.22106@klaava.Helsinki.FI> <1hpsasINN6e@meaddata.meaddata.com> <20502@ksr.com>
- Date: Tue, 29 Dec 1992 21:53:59 GMT
- Lines: 25
-
- zdenek@ksr.com (Zdenek Radouch) writes:
-
- >Stephen Williams writes:
-
- >>Statics are either explicitly initialized or they are not.
- >>If they are not, their contents are UNDEFINED until set.
- >>This is per ANSI C.
- >>There is NO requirement of the compiler or system to zero
- >>un-initialized statics (or auto's).
-
-
- >I'll quote for you:
-
- >"A static object not explicitly initialized is initialized as if it
- >(or its members) were assigned the constant 0. The initial value of
- >an automatic object not explicitly initialized is undefined."
-
-
- You are correct - what would be the advantage of a static in a function?
-
- If you NEEDED to initialize it, you would lose the value of the variable
- every time the function was called, nullifying the advantage statics have
- in functions, (namely holding a value out of visibility).
-
-
-