Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP6 Using strtran with wildcards
Message
De
16/10/2000 15:47:12
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00429940
Message ID:
00429984
Vues:
16
>>replace horse_name with left(horse_name, at("(", horse_name)-1))
>
>This gives me a error message "command contains unrecognized phrase/keyword"
>
>Do you think that the strtran function can be used with wildcards?

Sorry, won't work. StrTran() does exactly what it's supposed to do, so if you need parentheses removed, you'll have to code around. One way to do it would be
nOcLeft=occurs("(", cYourString)
nOcRight=occurs(")", cYourString)
do while nOcLeft=nOcRight and nOcLeft>0
   nAtLeft=at("(", cYourString)
   nAtRight=at(")", cYourString)
   cYourString=stuff(cYourString, nAtLeft, nAtRight-nAtLeft+1, "")
   nOcLeft=occurs("(", cYourString)
   nOcRight=occurs(")", cYourString)
enddo

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform