[nem-en] Increment and decrement operators

Kamil Skalski kamil.skalski at gmail.com
Mon Feb 27 18:32:55 CET 2006


2006/2/27, Kannan Goundan <cakoose at yahoo.com>:
>
> Why are there both "x++" and "++x" if the expression doesn't return a
> value?  Is it just to avoid syntax errors for those users who use one
> or the other out of habit?

Yes, they are just convenience shortcuts to the same thing -
incrementing variable and not returning any value.

>
> Also, I couldn't figure out exactly how the operator behaves.  It
> seems the commas in a function call are sequence points but the part
> of an infix expression aren't, which gives weird results:

Fixed in svn http://nemerle.org/mailman/pipermail/svn/2006-February/006113.html
:)


--
Kamil Skalski
http://nazgul.omega.pl


More information about the devel-en mailing list