Xref: utzoo comp.lang.c:8508 comp.sys.ibm.pc:13659 Path: utzoo!mnetor!uunet!pwcmrd!skipnyc!atpal!tneff From: tneff@atpal.UUCP (Tom Neff) Newsgroups: comp.lang.c,comp.sys.ibm.pc Subject: Re: C declaration styles Message-ID: <115@atpal.UUCP> Date: 24 Mar 88 21:14:29 GMT References: <5699@watdragon.waterloo.edu> <1065@sask.UUCP> <8695@tut.cis.ohio-state.edu> <18359@sci.UUCP> Reply-To: tneff@atpal.UUCP (Tom Neff) Organization: Rational Technologies, Inc. Lines: 18 Keywords: C declaration static function Summary: static int foo() means 'local scope' In article <18359@sci.UUCP> phil@sci.UUCP (Phil Kaufman) writes: >Declarations for functions are wonderful and avoid many errors but can >anyone tell me what the effect of the static modifier has in a function >defrinition? I have often seen the following: > static int foofunction (int, int) Microsoft C uses the /static/ storage class on a function definition to indicate that the function has local scope to the containing source module, i.e., no public symbol definition (PUBDEF record) will be emitted for that function (or other symbol with module-wide scope). Other compilation units are free to define symbols with the same name (though I wouldn't normally recommend it, as a matter of style), and MS LINK will not complain as long as all of them (or all but one) define using /static/. -- Tom Neff