Associative array mutation of a value

Tobias Pankrath tobias at pankrath.net
Thu Feb 6 23:01:32 PST 2014


On Thursday, 6 February 2014 at 15:16:14 UTC, bearophile wrote:
> Tobias Pankrath:
>
>> AA[key] = val; ?
>
> I don't understand. That syntax doesn't give you an error if 
> 'key' is missing in AA.
>
> Bye,
> bearophile

yes, brainfart. For a moment I thought that the index would throw 
if key is missing, return a reference otherwise and assign val to 
it. That's obviously wrong.



More information about the Digitalmars-d mailing list