December 08, 2007 Associative arrays rehashing. | ||||
---|---|---|---|---|
| ||||
Attachments: | Hi, I was wondering, if I call .rehash on an existing AA, do I need to assign the returned value to the original array (eg: "a=a.rehash;") or is simply calling .rehash sufficient (eg: "a.rehash;")? Jerome - -- +------------------------- Jerome M. BERGER ---------------------+ | mailto:jeberger@free.fr | ICQ: 238062172 | | http://jeberger.free.fr/ | Jabber: jeberger@jabber.fr | +---------------------------------+------------------------------+ |
December 09, 2007 Re: Associative arrays rehashing. | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jérôme M. Berger | ""Jérôme M. Berger"" <jeberger@free.fr> wrote in message news:fjenc4$2joo$1@digitalmars.com... > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi, > > I was wondering, if I call .rehash on an existing AA, do I need to > assign the returned value to the original array (eg: "a=a.rehash;") > or is simply calling .rehash sufficient (eg: "a.rehash;")? Just calling it is sufficient. AA variables are really pointers to a structure which holds a reference to the actual table. Once you've filled in an AA, no matter how much you modify it, that original structure never moves. |
Copyright © 1999-2021 by the D Language Foundation