Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Array not found...
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00046776
Message ID:
00046835
Vues:
25
>>Hi,
>>
>>I've run into a strange problem that I can't figure out how to 'fix'.
>>
>>I'm passing an array to a method and then referencing the passed in array in the method.
>>
>>I get this error when compiling the project: 'Unable to find Unkown LAVARARRAY'
>>
>>Here is my code.
>>
>>LPARAMETERS laVarArray, lcFileName
>>
>>LOCAL liFile, lcHTMDoc, i
>>
>>*** Open and read in the .htm file.
>>liFile = FOPEN(lcFileName)
>>li_Size = FSEEK(liFile, 0, 2)
>>=FSEEK(liFile, 0, 0)
>>lcHTMDoc = FREAD(liFile, li_Size )
>>
>>FOR i = 1 TO ALEN(laVarArray,1)
>> lcHTMDoc = STRTRAN(lcHTMDoc, '!!' + laVarArray(i,1) + '!!', laVarArray(i,2))
>>ENDFOR
>>
>>I'm dimensioning the array like this in the calling method:
>>DIMENSION laVarArray(3,2)
>>
>>The program runs fine, but I get that message on compile. Is there any way to eliminate the error message?
>>
>>Thanks,
>>
>>RETURN lcHTMDoc
>
>Jim,
>
>Try adding:
>
>EXTERNAL ARRAY laVarArray
>
>George

George, I found that EXTERNAL ARRAY didn't work in this situation. I had to use either public arrays (Mo's suggestion) or Ed Pikman's "IF .F." methodology. Never figured out why, as EXTERNAL ARRAY was included for just this purpose :-(

Barbara
Barbara Paltiel, Paltiel Inc.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform