alebrije - 2022-01-27

Hello,
I would like to save some values in a structure named Test
The structures is

TYPE test :
STRUCT
generalinfo :general; // another structure with 2 variables as string
testfreatures : freatures; // another structure with 2 variables as string
END_STRUCT
END_TYPE

I'm using a pointer to the structure test
VAR
INIValues1 : POINTER TO ARRAY [0..1000] OF STRING;
stTest : test;
END_VAR

Program

INIValues1 := ADR(stTest);
// I want to write the first value of the first structure inside test as follow
INIvalues1^[0].^[0] := 'Test';

How can I mange to do this... I would like later only to replace the struct so my function fits for many different structures.
Lets say later will be like:
if A then
INIValues1 := ADR(stTest);
ELSE
INIValues1 := ADR(stSomething);
END_IF
"Note, something will be also a struct of structures containing strings"