krakers - 2018-04-15

Hello all, I have an array of objects, lets say MyArray[1..x] of Object.

When programming I want to have a more "readable" way of addressing each object. Instead of saying MyArray[1] := ...etc. I would like to say MyReadableName :=...

I've looked into references, but I'm worried a bit about the whole pointer stuff. How could I do this in a good way and support online change? And where should I put the declaration and assignment of the references, it could be many many hundreds, and I don't want to clutter the Main VAR window when in online mode?

Another thing I've looked at is having an enum with the readable names and using this as an index into the array. The lookup is then MyArray[Enum.MyReadableName] :=... but I'm not sure if thats is a good solution.

Any solutions or hints are very welcome! Thanks!

 

Related

Talk.ru: 1