Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!princeton!caip!nike!cad!pavepaws!keppel From: keppel@pavepaws.berkeley.edu (David Keppel) Newsgroups: net.lang.c Subject: Re: Proper use of "extern" ... Message-ID: <518@cad.BERKELEY.EDU> Date: Sat, 7-Jun-86 20:27:24 EDT Article-I.D.: cad.518 Posted: Sat Jun 7 20:27:24 1986 Date-Received: Mon, 9-Jun-86 02:26:33 EDT References: <223@comp.lancs.ac.uk> Sender: news@cad.BERKELEY.EDU Reply-To: keppel@pavepaws.UUCP (David Keppel) Organization: CAD Group, U.C. Berkeley Lines: 19 Keywords: C static extern, extern, static, extern! (See spot run... :-) Summary: vote static Disrganization: University of California, Berkeley In article <223@comp.lancs.ac.uk> david@comp.lancs.ac.uk (David Coffield) writes: [ forward declaration of a static function: use static or extern keyword? ] > >At the top of this file do we put >a) static void g() or >b) extern void g()? (extern static must be meaningless). > >My understanding (this varies with the book you read) of "extern" is that >it means the object is declared "later in this file or in another file" in >which case I vote for (b). Is this right? Since static means (more or less) 'local', I'd vote for 'static', since it tells you right away that the declaration is somewhere *in this file*, whereas 'extern' tells you to *look elsewhere*. How does this match with 'standard practice'? ---- :-D avid K eppel ..!ucbvax!pavepaws!keppel "Learning by Osmosis: Gospel in, Gospel out"