digitalmars.D - associative arrays:
- llee (13/13) Oct 01 2008 Is there any reason why the following fails with an ArrayBoundsError err...
- Denis Koroskin (4/19) Oct 01 2008 That's one of the most frequently discussed bugs (or features?).
- Jarrett Billingsley (2/16) Oct 01 2008 What are you talking about? It compiles and runs for me in D1.
- Jarrett Billingsley (3/16) Oct 01 2008 Might be helpful to know what version of the compiler you're using.
- Denis Koroskin (3/27) Oct 01 2008 It doesn't for me (2.019)
- Jarrett Billingsley (2/31) Oct 01 2008 Then fail!
- Gide Nwawudu (5/33) Oct 01 2008 It is a bug in D2.
Is there any reason why the following fails with an ArrayBoundsError error? import std.cstream; void main () { string [string] array = ["name": "value"]; dout.writefln ("value: %s", array ["name"]); } I've been using the following work around, But I'm not sure why the above fails. ... string [string] array; array ["name"] = "value"; ... Can anyone explain this?
Oct 01 2008
On Wed, 01 Oct 2008 22:18:55 +0400, llee <Larry workingwondersus.com> wrote:Is there any reason why the following fails with an ArrayBoundsError error? import std.cstream; void main () { string [string] array = ["name": "value"]; dout.writefln ("value: %s", array ["name"]); }That's one of the most frequently discussed bugs (or features?). You can't do that (as of now).I've been using the following work around, But I'm not sure why the above fails. ... string [string] array; array ["name"] = "value"; ... Can anyone explain this?
Oct 01 2008
On Wed, Oct 1, 2008 at 9:26 PM, Denis Koroskin <2korden gmail.com> wrote:On Wed, 01 Oct 2008 22:18:55 +0400, llee <Larry workingwondersus.com> wrote:What are you talking about? It compiles and runs for me in D1.Is there any reason why the following fails with an ArrayBoundsError error? import std.cstream; void main () { string [string] array = ["name": "value"]; dout.writefln ("value: %s", array ["name"]); }That's one of the most frequently discussed bugs (or features?). You can't do that (as of now).
Oct 01 2008
On Wed, Oct 1, 2008 at 8:18 PM, llee <Larry workingwondersus.com> wrote:Is there any reason why the following fails with an ArrayBoundsError error? import std.cstream; void main () { string [string] array = ["name": "value"]; dout.writefln ("value: %s", array ["name"]); } I've been using the following work around, But I'm not sure why the above fails. ... string [string] array; array ["name"] = "value"; ... Can anyone explain this?Might be helpful to know what version of the compiler you're using. This code works for me in 1.034.
Oct 01 2008
On Wed, 01 Oct 2008 23:27:14 +0400, Jarrett Billingsley <jarrett.billingsley gmail.com> wrote:On Wed, Oct 1, 2008 at 8:18 PM, llee <Larry workingwondersus.com> wrote:It doesn't for me (2.019)Is there any reason why the following fails with an ArrayBoundsError error? import std.cstream; void main () { string [string] array = ["name": "value"]; dout.writefln ("value: %s", array ["name"]); } I've been using the following work around, But I'm not sure why the above fails. ... string [string] array; array ["name"] = "value"; ... Can anyone explain this?Might be helpful to know what version of the compiler you're using. This code works for me in 1.034.
Oct 01 2008
On Wed, Oct 1, 2008 at 10:10 PM, Denis Koroskin <2korden gmail.com> wrote:On Wed, 01 Oct 2008 23:27:14 +0400, Jarrett Billingsley <jarrett.billingsley gmail.com> wrote:Then fail!On Wed, Oct 1, 2008 at 8:18 PM, llee <Larry workingwondersus.com> wrote:It doesn't for me (2.019)Is there any reason why the following fails with an ArrayBoundsError error? import std.cstream; void main () { string [string] array = ["name": "value"]; dout.writefln ("value: %s", array ["name"]); } I've been using the following work around, But I'm not sure why the above fails. ... string [string] array; array ["name"] = "value"; ... Can anyone explain this?Might be helpful to know what version of the compiler you're using. This code works for me in 1.034.
Oct 01 2008
On Thu, 02 Oct 2008 00:10:41 +0400, "Denis Koroskin" <2korden gmail.com> wrote:On Wed, 01 Oct 2008 23:27:14 +0400, Jarrett Billingsley <jarrett.billingsley gmail.com> wrote:It is a bug in D2. http://d.puremagic.com/issues/show_bug.cgi?id=2333 GideOn Wed, Oct 1, 2008 at 8:18 PM, llee <Larry workingwondersus.com> wrote:It doesn't for me (2.019)Is there any reason why the following fails with an ArrayBoundsError error? import std.cstream; void main () { string [string] array = ["name": "value"]; dout.writefln ("value: %s", array ["name"]); } I've been using the following work around, But I'm not sure why the above fails. ... string [string] array; array ["name"] = "value"; ... Can anyone explain this?Might be helpful to know what version of the compiler you're using. This code works for me in 1.034.
Oct 01 2008