Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Array subscript
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Array subscript
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01483561
Message ID:
01483561
Vues:
130
I am getting a subscript error for one of my arrays. How can I test to see if a subscript exist for an array. In my code below, I am moving values to an array. I don't know how to test for a subscript out of range without crashing the program. If the subscript is out of range I can always increase my array size.
							case	reqsub_row = 0   && record for subreq doesn't exist, write mainreq only

** this is where I need to see if subscript bb is valid to move data.  How do I do that?
									a__generic(bb, 1) = a__reqmain(cntr, 1)		&& move mainkey

**if not valid subscirpt then redimension the array
	dimension a__generic(alen(a__generic, 1) + 1, alen(a__generic, 2)) &&increase array by 1 row
Any suggestions?

thanks
nick
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform