Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error Subscript is outside defined Range
Message
From
14/03/2013 12:34:46
 
 
To
14/03/2013 12:30:51
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01568386
Message ID:
01568388
Views:
31
>Using the following code i am getting error as Error Subscript is outside defined Range.
>Not able to solve it, kinldy Correct


Harsh,

SET STEP ON and go through your code line by line to figure out the cause. The error you're getting indicates your array size is 5 elements, for example, and you're trying to reference element 6 or later.

Running through a single iteration, and then trapping to the debugger, will let you examine the values of loop variables, record numbers, whatever you need to then put a SET STEP ON in your code under those conditions:
IF RECNO() >= 700 AND i >= 5
    SET STEP ON
ENDIF
Such tests will allow you to step through your code, examine the variables, and correct it. Natural debugging.
Previous
Reply
Map
View

Click here to load this message in the networking platform