Path: utzoo!mnetor!uunet!husc6!think!ames!pasteur!ucbvax!decvax!gsg!lew From: lew@gsg.UUCP (Paul Lew) Newsgroups: comp.lang.c Subject: Re: initializing Message-ID: <113@gsg.UUCP> Date: 20 Jan 88 19:06:07 GMT References: <303@Aragorn.dde.uucp> Reply-To: lew@gsg.UUCP (Paul Lew) Followup-To: comp.lang.c Organization: General Systems Group, Salem, NH Lines: 23 > From: be@dde.uucp (Bjorn Engsig) > Organization: Dansk Data Elektronik A/S, Herlev, Denmark > > This is good for statics but NOT for externals. You really want to > write the external variables ONE and only ONE place, and the header > file above is very appropriate. The scheme has at least proven to > be useful in the 3000 (three thousand, maybe more) source files large > software product I'm working on. There are side effects: if you add one variable to this file which is included by 3000 files, 'make' might rebuild everything when there are only 2 files that needs recompilation. This happened to me before and I dont like it. (However, I might use your approach if I have a CRAY..) Keep variables where it belongs and use tools like 'gid' will be a good compromise before you have a good CASE environment. You might also need some help when creating programs, e.g., bind some key in emacs to automatically insert external definition for the word before the cursor to the top of the file, etc. -- ---------------------------------------------------------------------- Paul Lew {olivea,harvard,decvax}!gsg!lew (UUCP) General Systems Group, 5 Manor Parkway, Salem, NH 03079 (603) 893-1000