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
I have an array of String but I do not know how many elements in it. If the user put 3 elements in the array then the total of index = 3. How can I scan all the elements array if it is not equal to '' (meaning NULL) and get the total of index in the array?
Thank you in advance
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I have an array of String but I do not know how many elements in it. If the user put 3 elements in the array then the total of index = 3. How can I scan all the elements array if it is not equal to '' (meaning NULL) and get the total of index in the array?
Thank you in advance
Use FOR loop.
Another possibility would be to write a class around the array of strings which does the housekeeping for you.
the main advantage is that your housekeeping code is neatly placed in a single spot.
Another possibility would be to write a class around the array of strings which does the housekeeping for you.
the main advantage is that your housekeeping code is neatly placed in a single spot.
Thank you, sir.