> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Eli 
>Marmor
> Sent: 12 March 2002 12:39

> Sander Striker wrote:
>> Consider:
>> 
>>  lines += 1;
>> 
>> Which is the same as:
>> 
>>  lines++;
>> 
>> Personally I am slowed down when I see this:
>> 
>>  ++lines;
>> 
>> Because I am used to seeing the op _after_ the variable.
> 
> "lines++" is NOT the replacement of "lines += 1", but of "(lines+=1)-1"

Uhuh, true.  If you are going to use the statement inside an expression.
If you are not, and it is just a one-liner, as above, the meaning is the
same.
 
> Only "++lines" is the replacement of "lines += 1".
> 
> For example, if you have to increment "lines" and after that insert 2
> times of it into result, and you MUST do it in one instruction, then
> "result = 2 * (lines += 1)" can't be replaced by "result = 2 * lines++"
> but only by "result = 2 * ++lines". It's not styling; It's a totally
> different thing.

I am not going to be amused if I see something like your example being
used anywhere ;)

> What you are USED to see, is your own taste, but in this case, even the
> meaning is different.

You are missing my point.
 
> But again, the whole issue is minor...

Yeah, let's close this thread on that account.


Sander

Reply via email to