Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error Subscript is outside defined Range
Message
De
14/03/2013 12:34:46
 
 
À
14/03/2013 12:30:51
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01568386
Message ID:
01568388
Vues:
30
>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform