extern char *

utzoo!decvax!ucbvax!unix-wizards utzoo!decvax!ucbvax!unix-wizards
Fri Dec 11 11:09:28 AEST 1981


>From ihuxl!jej at Berkeley Fri Dec 11 11:02:21 1981
It's a feature. zot [] is equivalent to zot * ONLY in parameter lists.
If you have an extern, you must declare it zot [], since otherwise it
thinks that there's an extern which holds a reference to a zot, and you
merrily follow it into random memory.

I hope this is clear; it's one of the things that you have to read the
fine print, or rather between the lines, of Kernighan and Ritchie to
figure out (and even then only when you get burned), and one of the places
that C so HORRIBLY butchers the difference between an object and a reference
to it that you should learn Algol 68 just to talk about it sensibly, as per
Sapir and Whorf...

					James Jones (ihuxl!jej)



More information about the Comp.unix.wizards mailing list