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:
00632505
Vues:
11
What's the question?

>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
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform