I need to send a pointer to an array to a function.
The SCL manual gives that example:
FUNCTION FC100 : VOID
VAR_IN_OUT
N_out : INT;
out : POINTER;
END_VAR
VAR_TEMP
ret : INT;
END_VAR
BEGIN
// ...
ret := SFC79(N := N_out, SA := out);
// ...
END_FUNCTION
FUNCTION_BLOCK FB100
VAR
ii : INT;
aa : ARRAY[1..1000] OF REAL;
END_VAR
BEGIN
// ...
FC100( N_out := ii, out := aa);
// ...
END_FUNCTION_BLOCK
the problem is that I don´t know how to manage that pointer in the receiving function (note that in the example it just re-delivers that pointer to a function system)
So, once I have received the pointer in a function, How do I use it??
Thanks
The SCL manual gives that example:
FUNCTION FC100 : VOID
VAR_IN_OUT
N_out : INT;
out : POINTER;
END_VAR
VAR_TEMP
ret : INT;
END_VAR
BEGIN
// ...
ret := SFC79(N := N_out, SA := out);
// ...
END_FUNCTION
FUNCTION_BLOCK FB100
VAR
ii : INT;
aa : ARRAY[1..1000] OF REAL;
END_VAR
BEGIN
// ...
FC100( N_out := ii, out := aa);
// ...
END_FUNCTION_BLOCK
the problem is that I don´t know how to manage that pointer in the receiving function (note that in the example it just re-delivers that pointer to a function system)
So, once I have received the pointer in a function, How do I use it??
Thanks