Iterating over struct

Hello All! Does it is possible in any way to iterate through the struct datatype, as if it was an array? Struct has the same datatype for all it instances. Thank you.

Hello, first of all what programming langauage are we talking about? kind regards, Oliver

Hello, Oliver. I mean IEC 61131-3 implementation in PLCnext Engineer. ST code. Thank you.

Hi Oleksandr, a struct is as an array just a datatype, not an iterable object. So, something like “for element in mystruct” will not work. You may use the MEMORY_COPY function, which works more or less like a pointer. But I’m questioning myself if in that case an array of struct would make more sense… Take care, Frank