Path: utzoo!utgpu!water!watmath!dalcs!garfield!john13 From: john13@garfield.UUCP (John Russell) Newsgroups: comp.lang.c Subject: Re: extern Keywords: extern qualifier Message-ID: <4405@garfield.UUCP> Date: 19 Jan 88 14:11:53 GMT References: <17428@topaz.rutgers.edu> <7123@brl-smoke.ARPA> Reply-To: john13@garfield.UUCP (John Russell) Distribution: na Organization: Memorial University of Newfoundland, St. John's Lines: 28 In article <7123@brl-smoke.ARPA> gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) writes: ]>Is the compiler allocating space for these variables, or is it just ]>identifying thier names as a reference to something from another ]>source file, to be resolved at link-time? ] ]Not quite either. There are two possible methods of implementation ]of extern data in C, but the model you should think of is: If it ]says "extern", it is a reference to something allocated elsewhere; That is the way you should think about it, but if you do something like this: file 1 - int fou; ... file 2 - extern int foo; ... foo = 1; then at least some compilers will run this properly (no warnings even). John -- "A Chinese soldier in Tibet who tried to tear off a British woman's Sergeant Bilko T-shirt has become the first known case of someone mistaking Phil Silvers for the Dalai Lama." -- Toronto Globe & Mail, Nov. 14/87