Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Transforming string representation
Message
 
 
À
05/10/2001 09:39:47
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00564145
Message ID:
00564756
Vues:
22
Thanks. For the particular problem, I had, I solved it the similar way Vlad originally suggested (e.g. just made small change in few methods), but if I would need to do this kind of transformation, I guess, I borrow your's and Vlad's ideas.

Thanks again.

>Ok. Here's corrected version.
>>Well, as Vlad pointed out, this would not work, if I have price33 as a variable. Besides, I wanted $100 and $1,000,000 for better readability. Anyway, thanks.
>>
>>I found some problems in this application, so I'm going to revise it anyway, and add this functionality in addition.
>>
>>BTW, what are good settings for numeric textbox, which should look like currency?
>>
>>Thanks in advance.
>>
>>>
>>>lcStrIn = "between(price, 100,1000000)"
>>>lcStrOut = ""
><b>llDelimiter = .T.</b>
>>>FOR i=1 TO Len( lcStr)
>>>	lcCurChar = Substr( lcStrIn, i, 1 )
>>>	IF Isdigit(lcCurChar) <b>And llDelimiter</b>
>>>		lcStrOut = lcStrOut + "$" + lcCurChar
>>>	ELSE
>>>		lcStrOut = lcStrOut + lcCurChar
>>>	ENDIF
>>>
>        <b>llDelimiter = NOT (BETWEEN( UPPER(lcCurChar), "A", "Z") And lcCurChar = "_")</b>
>>>
>>>ENDFOR
>
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