Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Looking for a snazzy way
Message
From
25/07/2001 05:29:18
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Looking for a snazzy way
Miscellaneous
Thread ID:
00534851
Message ID:
00534851
Views:
53
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
Will Jones
Next
Reply
Map
View

Click here to load this message in the networking platform