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!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!panda!talcott!harvard!seismo!uwvax!uwmacc!oyster
From: oyster@uwmacc.UUCP (Vicious Oyster)
Newsgroups: net.lang.c
Subject: Re: c programming style
Message-ID: <1286@uwmacc.UUCP>
Date: Tue, 16-Jul-85 12:47:00 EDT
Article-I.D.: uwmacc.1286
Posted: Tue Jul 16 12:47:00 1985
Date-Received: Thu, 18-Jul-85 06:08:25 EDT
References: <11570@brl-tgr.ARPA> <935@teddy.UUCP>
Reply-To: oyster@uwmacc.UUCP (Vicious oyster)
Organization: UWisconsin-Madison Academic Comp Center
Lines: 45

In article <935@teddy.UUCP> rdp@teddy.UUCP (Richard D. Pierce) writes:
>
>One of the points with the C i++ versus i = i = 1 issue is the one of
>pointers (although some alluded to it).
>
>
>stepping through the array of pointers can be done by by incrementing
>a pointer:
>
>	while (condition) /* or some other loop construct */
>	  . . . 
>
>	  argv++;
>
>This will get us to the next pointer, whereas,
>
>	  argv = argv + 1;
>
>will NOT (unless by the happy happinstance that a pointer is exactly
>the same size as a character!)
>
>The only equivalent "clear" statement would be:
>
>	argv = argv + sizeof(char *); !
>
   I worked for a company which was (well, *is*, but going down fast) fond of
making everything proprietary (i.e. non-standard).  They came up with a 
language called DASL (*), based very strongly on C, which
actually perverted the meaning of arithmetic in such a way that 
"argv = argv + n" ACTUALLY MEANT "argv = argv + n*sizeof(argv *)" !!  That
wasn't documented anywhere, and we had one hell of a time with a certain 
piece of code until we figured out what was going on.
   For the record, I think the "++var" idiom is vastly preferable to making up
yet another idiom.

* DASL is a registered to Datapoint Corporation to denote their proprietary
  programming language.  And if I never see another DASL program in my life
  I'll die happy.

-- 
 - 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."