Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
A little array....
Message
 
 
À
13/03/2002 19:44:39
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00632498
Message ID:
00632550
Vues:
12
>In the myapp.checker(), I will have a string and then pass the string to the 'array' maker, strip out all the A's, and put everything left into an array, and then return the array back to myapp.checker : laFinal.
>
>
> *-- myapp.checker
> LOCAL laFinal[1], lcString
> DIMENSION laFinal[1]
> laFinal[1] = ""
> lcString = "ABBBACCCADDD"
>
> laFinal = newobj.convert(lcString)
>
>
>
>
> *-- myapp.convert
> LPARAMETER lcData
> LOCAL laNewArray, lnCount, lnItemLine
> DIMENSION laNewArray[1]
> STORE 0 TO lnItemLine, lnCount
> lnCount = OCCURS("A", lcData)
> *-- Checked this, lnCount = 3
> *-- now, here is some code to take out extra stuff, like line feeds, etc..
>
> *-- Okay, all that will be left in lcData is letters....
> FOR lnWork = 1 TO lnCount
>  *-- put the data into an array, take out each "A", etc...
>  lnItemLine = lnItemLine + 1
>
> NEXT
>
> *-- Now, at this point I have and can see laNewA
Seems like your code was trancated... Is it possible to return an array in VFP7 from a function? Since older VFP versions I always passed array by reference into procedure and made changes with the array inside it.
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