Mar-14-2023, 09:24 PM
The code doesn't look awful to me. But you want to do something for each "d", and those are nested way down inside a hierarchical datastructure. If you need to do this with any frequency, the items should be more accessible.
In isolation, it's hard to make suggestions. But perhaps you should instead have a collection of objects, each of which has the "b", "c" and "d" information. Then you can just iterate over that collection.
So I'd focus on the data and the data layout, not the specific set of loops shown.
In isolation, it's hard to make suggestions. But perhaps you should instead have a collection of objects, each of which has the "b", "c" and "d" information. Then you can just iterate over that collection.
So I'd focus on the data and the data layout, not the specific set of loops shown.