FUNCTION foo
VAR_IN_OUT
in : ARRAY[0..1] OF STRING;
END_VAR
in[0] := 'hello';
in[1] := 'world';
END_FUNCTION
FUNCTION main
VAR bar : ARRAY[0..1] OF STRING; END_VAR
foo(bar);
printf('%s %s$n', REF(bar[0]), REF(bar[1]));
END_FUNCTION
When running the above example, the printed result is hworld, when it should be hello world.