November 18, 2008 Why can't I resize an array of associative arrays? | ||||
---|---|---|---|---|
| ||||
I'd like to have an array (plain vanilla) of associate arrays. I'm thinking of it as a sort of table, with the header for each column being the key of the element. Strangely, though, the following program simply doesn't work; it doesn't crash--it just hangs (before printing out the array length). module test2; import std.stdio, std.string; static void main() { string[string][] arrayOfAAs; arrayOfAAs.length = 9; writefln(arrayOfAAs.length); } |
November 18, 2008 Re: Why can't I resize an array of associative arrays? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Justin | It's a bug. With a patch sitting in the tracker. Please vote for it! (Though it's already #2 by votes) http://d.puremagic.com/issues/show_bug.cgi?id=929 --bb On Wed, Nov 19, 2008 at 6:05 AM, Justin <mrjnewt@hotmail.com> wrote: > I'd like to have an array (plain vanilla) of associate arrays. I'm thinking of it as a sort of table, with the header for each column being the key of the element. Strangely, though, the following program simply doesn't work; it doesn't crash--it just hangs (before printing out the array length). > > module test2; > > import std.stdio, > std.string; > > static void main() { > > string[string][] arrayOfAAs; > arrayOfAAs.length = 9; > writefln(arrayOfAAs.length); > > } > |
Copyright © 1999-2021 by the D Language Foundation