November 07, 2013 Re: How to re-initialise an associative array. | ||||
---|---|---|---|---|
| ||||
Posted in reply to Gary Willoughby | Am Wed, 06 Nov 2013 18:14:54 +0100 schrieb "Gary Willoughby" <dev@nomad.so>: > I'm not taking the chance and currently using: > > x = (int[string]).init; x = null; is shorter. Just saying ;) -- Marco |
November 08, 2013 Re: How to re-initialise an associative array. | ||||
---|---|---|---|---|
| ||||
Posted in reply to Marco Leise | On Thursday, 7 November 2013 at 15:50:05 UTC, Marco Leise wrote:
> Am Wed, 06 Nov 2013 18:14:54 +0100
> schrieb "Gary Willoughby" <dev@nomad.so>:
>
>> I'm not taking the chance and currently using:
>>
>> x = (int[string]).init;
>
> x = null; is shorter. Just saying ;)
Does that actually work? I thought you had to assign at least some value. I'm gonna test this.
|
November 08, 2013 Re: How to re-initialise an associative array. | ||||
---|---|---|---|---|
| ||||
Posted in reply to Gary Willoughby | On Friday, 8 November 2013 at 09:04:28 UTC, Gary Willoughby wrote:
> Does that actually work? I thought you had to assign at least some value. I'm gonna test this.
For D arrays and AA's .init, null and [] are pretty much the same thing.
|
Copyright © 1999-2021 by the D Language Foundation