Path: utzoo!utgpu!water!watmath!clyde!att!mtunx!rutgers!cmcl2!brl-adm!adm!rbj@icst-cmr.arpa From: rbj@icst-cmr.arpa (Root Boy Jim) Newsgroups: comp.unix.wizards Subject: Speaking of ksh Message-ID: <16093@brl-adm.ARPA> Date: 8 Jun 88 16:29:18 GMT Sender: news@brl-adm.ARPA Lines: 23 From: Doug Gwyn In article <3870001@hpcuhb.HP.COM> kluft@hpcuhb.HP.COM (Ian Kluft) writes: >I've seen malloc() bomb many times on an AT&T 3B5 at CSU Chico when people >used char [] and char * interchangeably across function calls. These have >been considered equivalent in all the C texts way back to K&R but, in reality, >at least AT&T's C compiler cannot always swallow it. Wait a doggone minute. An array has NEVER been equivalent to a pointer. The NAME of an array, when used in an expression, is (in MOST cases, but not all) converted to a pointer to its initial member. Really. Given char *foo; and char bar[] = "something";, foo is a *variable* while bar is a *constant*. Take two chapters of K&R and don't call me in the morning. (Root Boy) Jim Cottrell National Bureau of Standards Flamer's Hotline: (301) 975-5688 The opinions expressed are solely my own and do not reflect NBS policy or agreement My name is in /usr/dict/words. Is yours?