From owner-freebsd-questions Thu Dec 14 14:02:55 1995 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id OAA19015 for questions-outgoing; Thu, 14 Dec 1995 14:02:55 -0800 (PST) Received: from halloran-eldar.lcs.mit.edu (halloran-eldar.lcs.mit.edu [18.26.0.159]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id OAA18978 for ; Thu, 14 Dec 1995 14:02:45 -0800 (PST) Received: by halloran-eldar.lcs.mit.edu; (5.65/1.1.8.2/19Aug95-0530PM) id AA17461; Thu, 14 Dec 1995 17:01:53 -0500 Date: Thu, 14 Dec 1995 17:01:53 -0500 From: "Garrett A. Wollman" Message-Id: <9512142201.AA17461@halloran-eldar.lcs.mit.edu> To: kline@tao.thought.org (Gary D. Kline) Cc: questions@freebsd.org Subject: ANSI/POSIX (?) question.... In-Reply-To: References: Sender: owner-questions@freebsd.org Precedence: bulk < What does this syntax signify: > extern const char *const sys_siglist[]; `declare sys_siglist as const array [] of pointer to const char' > extern char *sys_siglist[];? `declare sys_siglist as array [] of pointer to char' > In particular, what does the "*const sys_siglist[] buy that the > "*sys_siglist[]" doesn't? Why would not: It disallows modification of the array. > extern const char *sys_sylist[]; `declare sys_siglist as array [] of pointer to const char' > suffice to tell the compiler that sys_siglist[] is an array of > constant character pointers? It's not. An array of constant character pointers would be: extern char *const sys_siglist[]; An array of pointers to constant characters is: extern const char *sys_siglist[]; An array of constant pointers to constant characters is: extern const char *const sys_siglist[]; -GAWollman -- Garrett A. Wollman | Shashish is simple, it's discreet, it's brief. ... wollman@lcs.mit.edu | Shashish is the bonding of hearts in spite of distance. Opinions not those of| It is a bond more powerful than absence. We like people MIT, LCS, ANA, or NSA| who like Shashish. - Claude McKenzie + Florent Vollant