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
Count := 0;
FOR i:=(First element of array eg.0) TO (Last element of array eg.10) DO
IF String[i] = '' THEN
Count := Count;
Count := Count + 1;
This will add 1 to the 'Count' in each instance that the String has any value other than NULL in it.
Log in to post a comment.