Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
'Invalid subscript reference'
Message
 
To
10/06/2002 18:33:19
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00666671
Message ID:
00667131
Views:
67
I could recreate this error.

Please note that this error does not come up in the usual Visual FoxPro Error message window, which will have the title of the window = 'Visual FoxPro' and then the error message.

The 'Invalid Subscript Reference' comes in a error message window with the title 'Program Error' and is not taken care of by my error handler.

This is where the error occurs:

do while .t.
*doevents
errorval = 0
RENAME "c:\MyFile." TO "c:\YourFile."
if errorval=1
loop
* else
* exit
endif
enddo

I am trying to rename MyFile. If an error occurs, it should go to my Error handler which will make a note of this error in the Log file and sets errorval=1, which will force FoxPro to be in the loop until it successfully renames the file.

And as you can see, I have commented the ELSE part, which is supposed to cause FoxPro to exit the Loop when it successfully renames the file. If this is uncommented I will not get this error.

Any thoughts anyone?

Ria
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform