Hi Stanmiller
Thanks for your reply.
Yes I can see how the array size is 2 and I assigned 3 elements. I didn't check the code as this is not the real code extracted from the project. I just typed couple of lines to show the issue without even checking, but thanks for bringing it up.
Yes, I do agree with everything you are saying. However the reason behind the original code is the following:
I am parsing a string such as "23:02:03" and later on trying to check if all elements are numbers (instead of trying to parse to an int array which most likely is not the best way of doing it ), followed by the Mod operation to convert a 24 hour time string to AM/PM.
The reason the second block of code works is because TimeComponents(0) is explicity converted to an Int when stored in iComponent0. And no math conflict computing modulus on a number.
That was also obvious in the above and that's why I tried that code to make sure that was the case.
But I thought I will bring the issue up for more compatibility between B4A and B4i codes.
Thanks again for your input