Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83 (MC830713); site erix.UUCP Path: utzoo!watmath!clyde!akgua!mcnc!decvax!mcvax!enea!erix!robert From: robert@erix.UUCP (Robert Virding) Newsgroups: net.lang.c Subject: Re: extern declaration inconsistency Message-ID: <326@erix.UUCP> Date: Fri, 6-Apr-84 14:24:13 EST Article-I.D.: erix.326 Posted: Fri Apr 6 14:24:13 1984 Date-Received: Sun, 8-Apr-84 01:41:29 EST References: <1538@mit-eddie.UUCP> Organization: L M Ericsson, Stockholm, Sweden Lines: 16 This is one instance when a pointer is not the same as an array. When the compiler sees extern char *ch; it assumes that ch is a pointer to a string of char. However when the compiler sees extern char ch[]; it assumes that ch IS the actual string, not a pointer. The difference in the code generated is how it actually references the external variable ch. I have also come across this feature in writing programs. Robert Virding @ L M Ericsson, Stockholm