Debug help - Programming in D exercise 3 on page 352. AA and opCmp

Dejan Lekic dejan.lekic at gmail.com
Sun Sep 7 13:04:38 UTC 2025


On Sunday, 7 September 2025 at 12:53:58 UTC, Brother Bill wrote:
> Two assert statements on lines 43 and 44 fail.
> Should these assert statements be correct, and if so, what 
> changes to make them correct.
> Or are they incorrect, and should be removed?
>
> Or have I made a mistake in implementing this exercise solution?

Ad the following code at line 35:

```d
areas[area2] = 1.25;
```

Assert is rightfully failing because the areas map did not have 
that object. Same goes for the second assert.


More information about the Digitalmars-d-learn mailing list