A Function [FindIndex] is given a string that it must match in an Array and return the Index [integer]. However if the Index is not found I do not want to return an integer.
I have tried returned false, null [give errors indicating that cannot convert false, null to integer] and even either omitting return or putting an EXIT command [gives errors indicating not all paths return a value].
However any value returned will cause an error because it does not correspond properly.
How would I go about handling such a situation?
I have tried returned false, null [give errors indicating that cannot convert false, null to integer] and even either omitting return or putting an EXIT command [gives errors indicating not all paths return a value].
However any value returned will cause an error because it does not correspond properly.
How would I go about handling such a situation?