error ? where ?

andrews

Well-known member
Joined
Nov 22, 2011
Messages
167
Programming Experience
5-10
I get always the same error in de watch mode but is there a error ?
see the monitor view, thanks for any response
monitor 2024-08-26 092647.jpg
 
Using strdouble() makes no sense in that context, but you haven't actually explained what you're trying to achieve, so how are we supposed to explain how to achieve it? If you want the value of the strdouble variable, then use strdouble. If you want to see a specific element in the array then you have to specify the index of that element, e.g. strdouble(0). If you want something else, I'm not going to try to guess what that might be.
 
For future reference, please don't post pictures of code or error messages or any other text unless it provides some additional value over the text itself. Even if you do provide extra value with a screenshot, you should still provide the text as text, formatted appropriately.
 
Using strdouble() makes no sense in that context, but you haven't actually explained what you're trying to achieve, so how are we supposed to explain how to achieve it? If you want the value of the strdouble variable, then use strdouble. If you want to see a specific element in the array then you have to specify the index of that element, e.g. strdouble(0). If you want something else, I'm not going to try to guess what that might be.

I use the method to easily send the values in the Strdouble() array to a sub that does calculations.
I think the latter is not important for the case.
Regardless of all this, I still do not understand why I get an error message so that the program cannot continue.
If the "error" I make cannot be found, I have to find another solution.
In any case, thanks for your answer
 
Firstly, I told you what the problem is and how to fix it. Secondly, that error should only affect what you see in the Watch window and not prevent you from continuing to debug.
 
You wrote that I can keep the array if I have to use all values which is the case.
You also wrote that I can use debug further which is not true, the "error" prevents further debugging.
And apparently you also do not see where the "error" is if there is one, I will look for another solution
 
a hint: look at the length of str in the watch window and the index of each array item. Compare that to the value of val you're using in the For loop.
 
a hint: look at the length of str in the watch window and the index of each array item. Compare that to the value of val you're using in the For loop.

Thanks for your interest
When I get str() with split and I see 3 indexen 0,1,2 with the places filled, why var is saying that length is 3 and not 2 what the rules are?
 
Thanks for your interest
When I get str() with split and I see 3 indexen 0,1,2 with the places filled, why var is saying that length is 3 and not 2 what the rules are?

The count is 3, your loop needs to only count to 2 to access the 3 items, which are str(0), str(1), str(2)
 
Sorry, but the "error" is already seen with the definition of StrDouble() because i is , like you can see, i = 0
 
Back
Top