Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Looking for a snazzy way
Message
De
25/07/2001 05:41:22
 
 
À
25/07/2001 05:29:18
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00534851
Message ID:
00534853
Vues:
15
This message has been marked as a message which has helped to the initial question of the thread.
Will,
Try:
IIF(Thisform.decPlaces=0, lcIm, Stuff(lcIm, Len(lcIm)-Thisform.decPlaces, 1, '.'))
HTH
>Hi All,
>
>I'm looking for a neat way to do the following case statement.. it's to set a input mask depending on decimal places
>
>
>Do Case
>Case Thisform.decPlaces = 0
>	lcIm = '99999999'
>Case Thisform.decPlaces = 1
>	lcIm = '999999.9'
>Case Thisform.decPlaces = 2
>	lcIm = '99999.99'
>Otherwise
>	lcIm = '99999999'
>EndCase
>
>
>The closest I have got is this
>
>lcIm = '99999999'
>lcIm = Stuff(lcIm, Len(lcIm)-Thisform.decPlaces, 1, '.')
>
>But this falls down on 0 dp
>
>Anyone got any ideas?
>
>TIA
Daniel
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform