Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why this code is crashing?
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01001374
Message ID:
01001469
Vues:
19
>The error I'm getting is "Subscript is outside defined range". I don't understand, why. I think, it's a bug in ASCAN function.
>
>Why
>
>? ascan(laRelations, m.lcTable, 2, ;
>			m.lnRelations, 4, 8)
>
>would return this error? lnRelations = 222. E.g. I can search from the first element, but I can not search starting from the second. Doesn't make any sense to me.
>
I found that I have to subsctract the number from the nElementsSearched, e.g.
? ascan(laRelations, m.lcTable, m.lnI, ;
			m.lnRelations - m.lnI, 4, 8)
works.
I would never have guessed that I need to substract this number and the Help is not explicit about it. Besides, I believe, I used that syntax without substracting before...
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform