Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
2, 4, or 6 characters
Message
De
04/04/2001 11:24:58
 
 
À
04/04/2001 11:12:02
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00491867
Message ID:
00491892
Vues:
15
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform