Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched.
Close
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.
π
1
Last edit: dFx 2021-02-05
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I have data in format of ARRAY[0..124] OF WORD.
It works - without using any
for loop
-, but I would like to understand the details that is whatSTRING(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.
Last edit: dFx 2021-02-05