I am trying to create an array inside another array but I think I am not doing it right.
can someone help me with the attached file?
just run the method, it prints the content of the "array_abc". The problem is that it does not have the content that I programmed to have through append method.
I expected it should print:
but it´s printing:
You need to do it this way:
is array1: string; array_abc: any[1,2] do for local i := 1 to 10 loop array1.append(num_to_str(i)); next; array_abc[1,1] := array1; print array_abc; end;
You should call append only directly for local variables. When you do something like
Plant Simulaiton will first read out array_abc[1,1] and return a copy, and then append "1" to that copy. Finally Plant Simulation will discard that copy.