Re: Why isn't ++x an lvalue in D?

2009-01-09 Thread Don
Weed wrote: Bill Baxter пишет: On Fri, Jan 9, 2009 at 2:43 PM, Weed wrote: Weed пишет: Bill Baxter пишет: 2009/1/9 Weed : Bill Baxter пишет: Another thread just reminded me of something I use frequently in C++ that doesn't work in D because ++x is not an lvalue: int x,N; ... ++x %

Re: Why isn't ++x an lvalue in D?

2009-01-08 Thread Weed
Bill Baxter пишет: > On Fri, Jan 9, 2009 at 2:43 PM, Weed wrote: >> Weed пишет: >>> Bill Baxter пишет: 2009/1/9 Weed : > Bill Baxter пишет: >> Another thread just reminded me of something I use frequently in C++ >> that doesn't work in D because ++x is not an lvalue: >> >>

Re: Why isn't ++x an lvalue in D?

2009-01-08 Thread Weed
Nick Sabalausky пишет: > "Weed" wrote in message > news:gk6n29$218...@digitalmars.com... >> Bill Baxter ?: >>> 2009/1/9 Weed : Bill Baxter ?: > Another thread just reminded me of something I use frequently in C++ > that doesn't work in D because ++x is not an lvalue: > >>

Re: Why isn't ++x an lvalue in D?

2009-01-08 Thread Weed
Bill Baxter пишет: > On Fri, Jan 9, 2009 at 2:22 PM, Weed wrote: >> Bill Baxter пишет: >>> 2009/1/9 Weed : Bill Baxter пишет: > Another thread just reminded me of something I use frequently in C++ > that doesn't work in D because ++x is not an lvalue: > >int x,N; > .

Re: Why isn't ++x an lvalue in D?

2009-01-08 Thread Nick Sabalausky
"Weed" wrote in message news:gk6n29$218...@digitalmars.com... > Bill Baxter ?: >> 2009/1/9 Weed : >>> Bill Baxter ?: Another thread just reminded me of something I use frequently in C++ that doesn't work in D because ++x is not an lvalue: int x,N; ...

Re: Why isn't ++x an lvalue in D?

2009-01-08 Thread Bill Baxter
On Fri, Jan 9, 2009 at 2:43 PM, Weed wrote: > Weed пишет: >> Bill Baxter пишет: >>> 2009/1/9 Weed : Bill Baxter пишет: > Another thread just reminded me of something I use frequently in C++ > that doesn't work in D because ++x is not an lvalue: > >int x,N; > ...

Re: Why isn't ++x an lvalue in D?

2009-01-08 Thread Weed
Weed пишет: > Bill Baxter пишет: >> 2009/1/9 Weed : >>> Bill Baxter пишет: Another thread just reminded me of something I use frequently in C++ that doesn't work in D because ++x is not an lvalue: int x,N; ... ++x %= N; So is there some deep reason fo

Re: Why isn't ++x an lvalue in D?

2009-01-08 Thread Bill Baxter
On Fri, Jan 9, 2009 at 2:22 PM, Weed wrote: > Bill Baxter пишет: >> 2009/1/9 Weed : >>> Bill Baxter пишет: Another thread just reminded me of something I use frequently in C++ that doesn't work in D because ++x is not an lvalue: int x,N; ... ++x %= N; >>>

Re: Why isn't ++x an lvalue in D?

2009-01-08 Thread Weed
Bill Baxter пишет: > 2009/1/9 Weed : >> Bill Baxter пишет: >>> Another thread just reminded me of something I use frequently in C++ >>> that doesn't work in D because ++x is not an lvalue: >>> >>>int x,N; >>> ... >>>++x %= N; >>> >>> So is there some deep reason for not making it an lvalu

Re: Why isn't ++x an lvalue in D?

2009-01-08 Thread Bill Baxter
2009/1/9 Weed : > Bill Baxter пишет: >> Another thread just reminded me of something I use frequently in C++ >> that doesn't work in D because ++x is not an lvalue: >> >>int x,N; >> ... >>++x %= N; >> >> So is there some deep reason for not making it an lvalue like in C++? >> > > ++x is x

Re: Why isn't ++x an lvalue in D?

2009-01-08 Thread Weed
Bill Baxter пишет: > Another thread just reminded me of something I use frequently in C++ > that doesn't work in D because ++x is not an lvalue: > >int x,N; > ... >++x %= N; > > So is there some deep reason for not making it an lvalue like in C++? > ++x is x+=1 in D: void main() {

Why isn't ++x an lvalue in D?

2009-01-08 Thread Bill Baxter
Another thread just reminded me of something I use frequently in C++ that doesn't work in D because ++x is not an lvalue: int x,N; ... ++x %= N; So is there some deep reason for not making it an lvalue like in C++? --bb