Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
2, 4, or 6 characters
Message
From
04/04/2001 11:24:58
 
 
To
04/04/2001 11:12:02
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00491867
Message ID:
00491892
Views:
16
RTRIM() I would think, Duncan. ALLTRIM() would mask whether or not the user put a blank first and I don't think you want to assume that blanks are padded with 0, that's not how I read Chuck's problem.

What about simply lValid = INLIST(LEN(RTRIM(cVal)),2,4,6) AND LEFT(cVal,1) # " "

The InputMask takes care of the rest....
>?INLIST(LEN(lcVal), 2, 4, 6) AND PADL(INT(VAL(lcVal)), LEN(lcVal), '0') = lcVal
>
>Will, I believe, give you what you want. You may need to ALLTRIM first.
>
>Regards,
>
>Duncan
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform