pointers to arrays
roy at phri.UUCP
roy at phri.UUCP
Sat Nov 22 13:02:52 AEST 1986
Last week I was visiting with relatives. Didn't have much to do so
I started flipping through some green-bar that was laying around. Turned
out to be a C program. It had the comment "in C, arrays don't have to be
rectangular". The author of the program is an ex-physicist, ex-Fortran
hacker, nouveau-Lisp hacker who is a civilian employee of the Army working
on machine vision. The ensuing conversation went something like:
Me: Hey, Bob, what do you mean "arrays don't have to be rectangular"?
Bob: They don't. In C you can have a two dimensional array with each line
a different size, using dynamic memory allocation.
Me: Uh, you mean an array of pointers, don't you?
Bob: It's the same thing.
Me: No it's not.
Bob: That's what they taught us.
Me: Who taught you that? Whoever taught you that should be shot!
Bob: DEC did. We all went to a class in C programming DEC gave.
--
Roy Smith, {allegra,cmcl2,philabs}!phri!roy
System Administrator, Public Health Research Institute
455 First Avenue, New York, NY 10016
"you can't spell deoxyribonucleic without unix!"
More information about the Comp.lang.c
mailing list