I have data in format of ARRAY[0..124] OF WORD.
TYPE DUTtest :
aData : ARRAY[0..124] OF WORD;
strData : STRING(125*2);
It works - without using any for loop -, but I would like to understand the details that is what STRING(125*2) does?
Thanks in advance.
Feels like some nerdish code writing style.
String is no more than a byte array. With this in mind, to get the same length than the word array, you need to double the word array length.
You could define string(250) and it would also work.
Actually as 125x2 is a constant, it is probable that the compiler will just compile the same.
Log in to post a comment.