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
well if you need the number of elements it is 63-0 +1
the size is the number of bytes needed a boolean is byte size.+2
if you try it what is result? 65!!
for an INT it is 2*64+2 is 130,
etc
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
if I define an array as:
MyArray : ARRAY [0..63] OF BOOL;
is there some instruction that get back the array-elements size (64 in my sample)?
Regards
I'm answering myself.. SIZEOF (return number of bytes of a variable) but need to consider the type of data (ex. byte or int or...)
well if you need the number of elements it is 63-0 +1
the size is the number of bytes needed a boolean is byte size.+2
if you try it what is result? 65!!
for an INT it is 2*64+2 is 130,
etc