Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select text based on a number
Message
De
02/10/2004 06:33:59
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00948140
Message ID:
00948182
Vues:
22
Hi,

If it's just the simple case then maybe something simple like :
STREXTRACT(":ONE:TWO:THREE:FOUR:FIVE:SIX:SEVEN:EIGHT:NINE:TEN",":",":",m.NumberVariable)
HTH,Viv
>>
Is there a command that will allow you to select text based on a number?
Say you have a number value 1, 2, or 3 and you want to return the text "This is one" if the number value is 1, and "This is two" if the number value is 2, etc. Is there a command that can do this type of thing, I would guess it would look something like this...
m.StringVariable = ???(m.NumberVariable,'One','Two','Three')
so m.StringVariable = 'One' if the m.NumberVariable = 1
I can do this with multiple IIF(), but if there is a easier way I'd sure like to know.
>>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform