Re: lvalue - opIndexAssign - Tango

2009-03-13 Thread Denis Koroskin
On Sat, 14 Mar 2009 06:41:52 +0300, The Anh Tran wrote: Hi, When porting from c++ to D, i encounter this strange discrimination: 1. Built-in AA: int[int] arr; arr[123] += 12345; arr[321]++; 2. Tango HashMap: auto hm = new HashMap!(int, int)(); hm[123] +

Re: lvalue - opIndexAssign - Tango

2009-03-13 Thread Daniel Keep
The Anh Tran wrote: > Hi, > > When porting from c++ to D, i encounter this strange discrimination: > 1. Built-in AA: > int[int] arr; > arr[123] += 12345; > arr[321]++; > > 2. Tango HashMap: > auto hm = new HashMap!(int, int)(); > hm[123] += 12345; // error not lvalue > h

lvalue - opIndexAssign - Tango

2009-03-13 Thread The Anh Tran
Hi, When porting from c++ to D, i encounter this strange discrimination: 1. Built-in AA: int[int] arr; arr[123] += 12345; arr[321]++; 2. Tango HashMap: auto hm = new HashMap!(int, int)(); hm[123] += 12345; // error not lvalue hm[123]++; // err

Re: recognizing asciiz, utf ...

2009-03-13 Thread Daniel Keep
newbee wrote: > Jarrett Billingsley Wrote: > >> On Fri, Mar 13, 2009 at 3:04 PM, newbee wrote: >>> Hi all, >>> >>> How does one check for asciiz, utf ...? >>> I do get a buffer with characters as parameter in a function, but i don�t >>> know if it is asciiz or utf or wchar. Is it possible to f

Re: recognizing asciiz, utf ...

2009-03-13 Thread newbee
Jarrett Billingsley Wrote: > On Fri, Mar 13, 2009 at 3:04 PM, newbee wrote: > > Hi all, > > > > How does one check for asciiz, utf ...? > > I do get a buffer with characters as parameter in a function, but i don’t > > know if it is asciiz or utf or wchar. Is it possible to find out in dmd1 > >

Re: recognizing asciiz, utf ...

2009-03-13 Thread Jarrett Billingsley
On Fri, Mar 13, 2009 at 3:04 PM, newbee wrote: > Hi all, > > How does one check for asciiz, utf ...? > I do get a buffer with characters as parameter in a function, but i don’t > know if it is asciiz or utf or wchar. Is it possible to find out in dmd1 and > dmd2? > > Any help is appreciated. Ho

recognizing asciiz, utf ...

2009-03-13 Thread newbee
Hi all, How does one check for asciiz, utf ...? I do get a buffer with characters as parameter in a function, but i don’t know if it is asciiz or utf or wchar. Is it possible to find out in dmd1 and dmd2? Any help is appreciated.

Re: enum to string

2009-03-13 Thread Daniel Keep
Ary Borenszweig wrote: > Lionello Lunesu wrote: >> >> "Brad Roberts" wrote in message >> news:alpine.deb.2.00.0903121755240.4...@bellevue.puremagic.com... >>> That said, I don't think this really helps the desired usecase much. >>> It's >>> useful, don't get me wrong, but still requires code to

Re: enum to string

2009-03-13 Thread Ary Borenszweig
Lionello Lunesu wrote: "Brad Roberts" wrote in message news:alpine.deb.2.00.0903121755240.4...@bellevue.puremagic.com... That said, I don't think this really helps the desired usecase much. It's useful, don't get me wrong, but still requires code to build up the bi-directional translations.