Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
2, 4, or 6 characters
Message
From
04/04/2001 12:05:29
Chuck Tripi
University of Wisconsin - Milwaukee
Milwaukee, Wisconsin, United States
 
 
To
04/04/2001 11:24:58
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00491867
Message ID:
00491939
Views:
8
After did some testing, it did just about all right, yet found that it would accept (.T.) the "02..14", which we don't want. It must be:

02....
or
0412..
or
031050

If you wonder what's this for, it's:
Division (first 2)
Department (middle 2, but must have first 2 also to make up this department, like two computer departments but in different catagory/buildings)
Sub Department (last 2, but must have first 4 to make up this sub)

Chuck

>lValid = INLIST(LEN(RTRIM(cVal)),2,4,6) AND LEFT(cVal,1) # " "
>The InputMask takes care of the rest.... (Chuck add here... I have "T" for Format so the LEFT isn't needed, but will still use it to make sure ;)

>>?INLIST(LEN(lcVal), 2, 4, 6) AND PADL(INT(VAL(lcVal)), LEN(lcVal), '0') = lcVal
Today is tomorrow's yesterday.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform