Hello,
I want to access the elements of an array with the aid of a variable (indirect accessing the elements of an array).
For example, an array of type byte is defined (byte_array [1..10] of BYTE).
I want to access the element nr. 3 from the array using a variable (let's say x, where x is defined as BYTE type), so to make something like byte_array[x] (instead of byte_array[3]).
This byte_array is defined as a static variable inside a FB.
How can I achieve this?
Thanks!
I want to access the elements of an array with the aid of a variable (indirect accessing the elements of an array).
For example, an array of type byte is defined (byte_array [1..10] of BYTE).
I want to access the element nr. 3 from the array using a variable (let's say x, where x is defined as BYTE type), so to make something like byte_array[x] (instead of byte_array[3]).
This byte_array is defined as a static variable inside a FB.
How can I achieve this?
Thanks!