Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Input format
Message
De
27/11/2009 13:24:01
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
27/11/2009 09:02:49
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
01436658
Message ID:
01436765
Vues:
66
>>>Another more felxible solution is
>>>if !upper(chr(nKeyCode))$"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 "
>>>   nodefault
>>>endif
>>
>>Good morning. (Well, afternoon in your case). Why is that more flexible?
>
>I would guess that if I wanted to include other specific characters (say * or %) I could include them in the string very easily.

Still doesn't translate too well for other codepages. Even chr(255) can be a valid character somewhere. VFP's isalpha() function works fine for those, so you'd be better off building this string once early (in the init of an object), to include any characters for which isdigit() or isalpha() return .t., plus your personal assortment of punctuation. Then everything else is rejectable.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform