Clarification needed on Pointers/Arrays

Doug Gwyn gwyn at smoke.BRL.MIL
Fri Mar 3 00:51:49 AEST 1989


In article <11914 at haddock.ima.isc.com> karl at haddock.ima.isc.com (Karl Heuer) writes:
-In article <890 at acf3.NYU.EDU> sabbagh at acf3.UUCP () writes:
->	int a[10],b[10];
->	a = b;
-Not so.  C has had struct copy for the last decade; I understand that array
-copy was not added at the same time only because they couldn't find a clean
-way to fit it into the existing language.  The invention of prototypes did
-provide a (relatively) clean path, but unfortunately X3J11 didn't take it.

Excuse me, but C array types were already too badly broken to be fixed
by anything X3J11 could do.  Of course we could have devised a new
language with arrays as first-class citizens, but it wouldn't be C.

There are problems with C arrays beyond the conversion of [] to * in
formal function parameters.



More information about the Comp.lang.c mailing list