mixing pointers and arrays

Mike Lutz mjl at ritcv.UUCP
Tue Aug 16 03:58:11 AEST 1983

Personally I like the idea of array names being equivalent to the
address of the first item in the array.  Philosophically, an array name
is simply a pointer constant, just like 87 is an integer constant.  One
of the biggest wins for this interpretation is that C can handle
strings conveniently (I won't stretch the point to say "elegantly").
Since this is something of a religious issue, I will try to be tolerant
of the heathens and infidels who don't believe in the tenets of the One
True Language.

I do have a complaint about the interpretation of a structure names, in
that these should be identical to array names.  That is, if "foo" is a
structure, then "foo" by itself should be a pointer to the structure.
In this instance, my complaint is based on the desireability of
consistency rather than the emotional issues of what an array/structure
name should denote.  I would like to treat arrays and structures

By the way, I think the Whitesmith's compiler does (or previous
versions of it did) interpret structure names as pointers.

Mike Lutz {allegra,seismo}!rochester!ritcv!mjl

More information about the Comp.lang.c mailing list