Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!amdcad!ames!ucbcad!pasteur!ucbvax!husc6!rutgers!topaz.rutgers.edu!mccarrol From: mccarrol@topaz.rutgers.edu () Newsgroups: comp.lang.c Subject: extern Message-ID: <17428@topaz.rutgers.edu> Date: 18 Jan 88 00:17:34 GMT Organization: Rutgers Univ., New Brunswick, N.J. Lines: 23 Keywords: extern qualifier I have a couple of questions concerning the extern qualifier in C. First: Is it possible to put an external declaration outside the body of any function? I'm writing a large program in several separate modules, and I'd like to have a listing at the beginning of each file of what external variables are used in the file. Can extern be used this way? Second: I know that my compiler doesn't complain against extern's outside of function bodies, but I'm not sure if it does what I want. 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? Just in case it matters ( although I doubt it; this MUST be standardized, right?) I'm using Lattice C 3.10 on an Amiga. -- "It is a principle of the music/to repeat the theme |Mark C. Carroll Repeat/and repeat again/as the pace mounts. /------/Rutgers U CS Student The theme/is difficult/but no more difficult |ARPA :CARROLL@AIM.RUTGERS.EDU than the facts to be/resolved"-WC Williams |Usenet:mccarrol@topaz.rutgers.edu