Yes, that does it! An index as simple as "i" apparently conflicts with internal Visual FoxPro variables. If you are right and "i" conflicts with a work area, that feature must be a holdover from older versions of FoxPro.
Thanks so much. I won't use single-character variables again in FoxPro!
No, the array name isn't significant. I've renamed the array a number of ways. And I reduced the program to this sample that fails on one machine.
I've restarted VFP and rebooted my machine as well. If I get desperate I'll re-install VFP. But I really don't want to go through that effort...
I'm having VFP problems with code using arrays. On one machine, the following code runs successfully:
DIMENSION array[20]
FOR x = 1 TO 5
array[x] = RAND()
ENDFOR
clear
?? array[1]
?? array[2]
?? array[3]
?? array[4]
?? array[5]
?
FOR i = 1 TO ALEN(array)
?? array[i] && sometime...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.