Date: Thu, 14 Dec 1995 17:01:53 -0500 From: "Garrett A. Wollman" <wollman@lcs.mit.edu> To: kline@tao.thought.org (Gary D. Kline) Cc: questions@freebsd.org Subject: ANSI/POSIX (?) question.... Message-ID: <9512142201.AA17461@halloran-eldar.lcs.mit.edu> In-Reply-To: <m0tQLAs-0001wxC@tao.thought.org> References: <m0tQLAs-0001wxC@tao.thought.org>
next in thread | previous in thread | raw e-mail | index | archive | help
<<On Thu, 14 Dec 1995 13:26:45 -0800 (PST), kline@tao.thought.org (Gary D. Kline) said: > 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9512142201.AA17461>