Xref: news2.mv.net comp.os.msdos.djgpp:8425 From: Paul Shirley Newsgroups: comp.os.msdos.djgpp Subject: Re: Declaring global arrays in a multisource project Date: Sun, 8 Sep 1996 17:53:31 +0100 Organization: DrinkSoft Lines: 20 Distribution: world Message-ID: References: <01I937U2638O00D67E AT cc DOT uab DOT es> <50ou0o$btf AT status DOT gen DOT nz> NNTP-Posting-Host: chocolat.foobar.co.uk Mime-Version: 1.0 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp In article <50ou0o$btf AT status DOT gen DOT nz>, Bruce Foley writes >I'd use this one: >> extern char my_global_array[256]; > > >> extern char *my_global_array; >> extern char my_global_array[]; > > >Also, use a #define for the array size so that if you decide to change >it, you only have to do it in one place. Remember, the only reason (in this case) for supplying the array size is to allow sizeof to work, so either import the size as a #defined symbol OR don't supply a size at all (so the compiler can trap use of sizeof). -- Paul Shirley