www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/09/04/18:04:39

Date: Thu, 05 Sep 1996 09:50:59 +0000
From: Bill Currie <billc AT blackmagic DOT tait DOT co DOT nz>
Subject: Re: Declaring global arrays in a multisource project
To: "x DOT pons AT cc DOT uab DOT es" <ILGES AT cc DOT uab DOT es>
Cc: djgpp AT delorie DOT com
Message-id: <322EA283.6DD5@blackmagic.tait.co.nz>
Organization: Tait Electronics NZ
MIME-version: 1.0
References: <01I937U2638O00D67E AT cc DOT uab DOT es>

x DOT pons AT cc DOT uab DOT es wrote:
> 
> Dear programmers,
> 
> In a multi-source project I have a global array, declared as:
> 
>   char my_global_array[256];
> 
> in one of the modules.
> 
> Which is the best way of declaring it on the other modules?
> 
>   extern char my_global_array[256];                ^^^ Prefered
>   extern char *my_global_array;                ^^^ NEVER (Not the same thing for globals)
>   extern char my_global_array[];                ^^^ I'm pretty sure this works
> 
> Thanks,
> 
> XP

Bill

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019