Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site uwmacc.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!uwvax!uwmacc!oyster From: oyster@uwmacc.UUCP (Vicious Oyster) Newsgroups: net.lang.c Subject: Re: c programming style Message-ID: <1303@uwmacc.UUCP> Date: Fri, 19-Jul-85 15:58:22 EDT Article-I.D.: uwmacc.1303 Posted: Fri Jul 19 15:58:22 1985 Date-Received: Sun, 21-Jul-85 02:36:41 EDT References: <13@brl-tgr.ARPA> Reply-To: oyster@uwmacc.UUCP (Vicious oyster) Organization: UWisconsin-Madison Academic Comp Center Lines: 34 In article <13@brl-tgr.ARPA> lcc.niket@UCLA-LOCUS.ARPA (Niket K. Patwardhan) writes: >I am not sure whether you implied C does not interpret > >argv = argv + n > >as > >argv = argv + n*sizeof(argv *) (treating everything like an int). >According to the reference manual, adding an int to a pointer (however you do >it) adds enough to the pointer that the new value points to the object n >elements away from the original object pointed to. Thus C does the same thing >as DASL. Yeah, you're right. I still think it sucks swamp water. People who enjoy touting the language they use (e.g. C) over, say, Fortran, generally come up with negative examples like the infamous "Fortran redefining the value of constants" feature. I submit that equating a globally recognized set of constants (i.e. the set of integers) with values that differ depending on whatever program variable happens to be nearest to them is guaranteed to be misleading. Especially when, as I stated in my original posting, it is not documented (for DASL, not C). To my trained and experienced mind, incrementing and adding a constant are very different things (and C programmers and language developers are not gods :-). (Disclaimer for those who believe that a person's greatness depends upon his or her knowledge of C minutae: I coded in C only during my few years in college; I worked with a C-like language in the real world, and now, among other things, support a Pascal compiler (blecch!)). -- - joel "vo" plutchak {allegra,ihnp4,seismo}!uwvax!uwmacc!oyster "Take what I say in a different way and it's easy to say that this is all confusion."