----- Original Message ----- From: "Spehro Pefhany" To: Sent: Thursday, July 26, 2001 7:15 PM Subject: Re: [PIC]: Tied up with String: OR the String Cheese Incident > At 04:39 PM 7/26/01 +0100, you wrote: > > > Actually, `buffer' behaves perfectly consistently if you think of > >it as a constant which happens to have type (char *), just as 1 is a > >constant that happens to have type (int). The value of the constant > >`buffer' is the address of the start of the array you declared. > > I think somebody (the RAmmerman?) had an example where it did *not* behave > as a constant pointer to char.. using sizeof. sizeof() gives the size of the > entire array for an array name, and the size of the pointer for a pointer. That is correct. > He spoke of array names "decaying" to pointers to char, an interesting > term that is neither in the standard (ISO/IEC 9899:1999 (E)) > nor in K&R II. Yes, I used that term, in quotation marks, and was aware it was not a standard term. I have seen it used to describe what happens however. Bob Ammerman RAm Systems (contract development of high performance, high function, low-level software) -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads