Path: utzoo!attcan!uunet!husc6!cmcl2!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: extern question Keywords: static struct forward declaration Message-ID: <8213@brl-smoke.ARPA> Date: 5 Jul 88 03:57:01 GMT References: <4182@pasteur.Berkeley.Edu> <8200@brl-smoke.ARPA> <457@m3.mfci.UUCP> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB)) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 14 In article <457@m3.mfci.UUCP> karzes@mfci.UUCP (Tom Karzes) writes: > extern struct foo x; > extern struct bar y; > struct foo x = {123, &y}; > struct bar y = {456, &x}; >Now suppose you want to make x and y static. What do you do? Same thing, but include "static" in all declarations that mention them, particularly the first. static struct foo x; static struct bar y; static struct foo x = { 123, &y }; static struct bar y = { 456, &x };