I would like deal with multidimensional array in Cspro logic for replacing lot of if..then..elseif with more concise code.
Assumming that i have this array:
Code: Select all
array string tesArray(5,3) =
"YKY", "S1","1",
"ABC", "S2","2",
"UJO", "S3","3",
"LOP", "S4","4",
"VGY", "S5","5";
Assuming that i have two items :
Item1 and Item2
How to fill Item2 with S1 if item1=1 and so on?
I find some good explanations on https://overiq.com/c-programming-101/tw ... rray-in-c/
and https://processing.org/tutorials/2darray/
about dealing with array in C. But, until now, i can't find a way to transpose theses explanations to Cspro Logic.
My first idea is to loop using Cspro's substring expressions but it's not appropriate for array and i don't find how to identify:
numeric i to line and numeric j to column...
Thanks in advance for your support.