Closed alex-boring closed 1 year ago
If I understand correctly, you need to look at the array
member of the type info struct to get the lower and upper bounds. Then you can go through each index and recurse through the members.
I'm closing this for now, feel free to reopen if you are not satisfied.
Hey, the library is working great so far!
One question I have when using it that you might be able to answer: do you have an example on how to decode (and flatten) arrays, especially struct arrays using the library?
Example Struct:
Example Usage in MAIN Program:
Getting the nested symbol information for non-array symbols works like a charm with your recursive function in the examples. Using an adjusted version of your function I am getting down to the Array level like this, but not further. Example print:
Name: GVL_MainGlobals.TestParams Level: 1 Typ: ARRAY [1..6] OF ST_Test Size: 2650
Now when I am using the Rust app to get all the information on the symbols in a struct array it would be great to get a flattened array like this that I can work with and forward. How the print could ideally look like:
This becomes even trickier for multi dimensional arrays I assume.
Thanks in advance, Alex