Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Invalid subscript reference
Message
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
Database:
Visual FoxPro
Divers
Thread ID:
01413995
Message ID:
01413996
Vues:
53
>All
>
>I get an invalid subscript reference error on the line that calls FlipFields()
>I used ayGapMultipleValue to try to fix it, thinking it was a parameter passing problem, but it did not change anything.
>The debugger shows all values present and correct before the call.
>
>field "oFromExcel.f" is of the form nnn,nnn,nnn,nnn...
>ayGapMultiple[] parses it out to an array
>I want to loop the array and pass the original record object and this specific part of the .f field to FlipFields()
>
>What am I overlooking?
>
>Thanks,
>
>Al Allison
>
>
>
>SCATTER FIELDS a,b,c,d,e,f,g,h,i,j,k,l,m NAME oFromExcel
>
>nGapMultiple = ALINES(ayGapMultiple, oFromExcel.f, 1,',')
>IF nGapMultiple = 0
>	DO FlipFields( oFromExcel, 'mult', '')         && pass an empty string for the last parameter
>ELSE
>	FOR iCount= 1 TO nGapMultiple
>		ayGapMultipleValue = ayGapMultiple[iCount]
>		DO FlipFields( oFromExcel, 'mult', ayGapMultipleValue)       && pass the array value for the last parameter
>	ENDFOR
>ENDIF
>
>
>PROCEDURE FlipFields()
>LPARAMETERS toFromExcel, tcCaller, tcValue
>
>
>
Don't DO a function either
  DO FlipFields WITH oFromExcel, 'mult', ''         && pass an empty string for the last parameter
or
  =FlipFields(oFromExcel, 'mult', '')         && pass an empty string for the last parameter
Charles

"The code knows no master." - Chuck Mautz
"Everybody is ignorant, only on different subjects." - Will Rogers
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform