For vIndex = 0 to 100
vTemp = gData.mData( vIndex )
code…
gData.mData( index ) = vTemp
Next vIndex
This code ran with no errors on a windows machine using 2017R3
I have no local or global variable named {index} just local {vIndex} in a method.
gData.mData( index ) = vTemp loaded vTemp into array element 0 every time.
It did compile and run in DEBUGER with no error. What gives…
For vIndex = 0 to 100
vTemp = gData.mData( vIndex )
code...
gData.mData( index ) = vTemp <---- Shouldn't this be vIndex and not index?
Next vIndex
The line I have pointed to is using a different index from the loop index of vIndex.
@Simon Berridge , that was his point. He made that typo, but it compiled anyway, leaving him confused as to why it didn’t throw a compile error. He doesn’t think there is any property in his project with that name, so the compiler should have complained.
Thanks for all the answers. it was code in a simple method that did not give an error that variable ( index ) was not declared.
It took some hard looking to figure out what was going on. I did a search thru out the whole program for the variable index . nothing found. but it compiled and ran in the debugger. And if someone can tell me how to use code tags… i’ll use them Thanks again…
[quote=387520:@Dave S]Code Tags are easy, two ways to to it
click the code icon in the upper right corner (docoument icon with the <>) and enter you code between those tags
just type the tags to start and to end (however, use SQUARE brackets [] not <>)[/quote]
Or type your code first without the tags, then select it and click the icon.