Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strip leading zeros
Message
From
22/10/2009 12:17:51
 
 
To
20/10/2009 19:32:27
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01430254
Message ID:
01430684
Views:
59
Thanks for taking the time to respond. I wound up implementing Hilmar's expression, but I think the INLIST idea has possibilities and I'll investigate it.
>
>Alternately, you could build a list for the inlist function, and then macro it... something like
>
lcExpr=[inlist(myfield, "290", "0290", "00290","000290", "0000290", .... "0000000290")]
>* and then 
>scan for &lcExpr
>...
>endscan
>
>Actually, you could build these lists backwards, making sure that you padl() whatever the user enters with zeros to fill c(10), then build the array or list by chopping one character from the left until the first character is a nonzero.
Previous
Reply
Map
View

Click here to load this message in the networking platform