digitalmars.D.learn - Associative arrays rehashing.
- =?UTF-8?B?IkrDqXLDtG1lIE0uIEJlcmdlciI=?= (18/18) Dec 08 2007 -----BEGIN PGP SIGNED MESSAGE-----
- Jarrett Billingsley (6/12) Dec 08 2007 Just calling it is sufficient. AA variables are really pointers to a
-----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;")? Jerome - -- +------------------------- Jerome M. BERGER ---------------------+ | mailto:jeberger free.fr | ICQ: 238062172 | | http://jeberger.free.fr/ | Jabber: jeberger jabber.fr | +---------------------------------+------------------------------+ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQFHWuDEd0kWM4JG3k8RAjh7AJ9cIIaO/FiIPdQJdXffrljn/KnI7gCgkI89 F/A5MaclfJVFAiYF1/Rkaco= =bG9u -----END PGP SIGNATURE-----
Dec 08 2007
""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.
Dec 08 2007