Changing behavior of associative array

kdevel kdevel at vogtner.de
Sat Dec 16 21:30:55 UTC 2023


On Saturday, 16 December 2023 at 20:04:54 UTC, Kevin Bailey wrote:
> I've added a TON of writeln's to confirm this. The *instant* I 
> made the parameter "ref", the real program starts acting as 
> expected, and the print-outs show the correct results.

If you comment out this line

```
//    m[f] = 1;
```

in your main function of your posted code you can catch up with 
your
real programm insofar as you now need a ref parameter here, too.

>
> Does anyone know why the behavior would change? Has anyone seen 
> anything like this?

Sure.



More information about the Digitalmars-d-learn mailing list