Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Numbers in character field?
Message
 
 
À
04/12/2000 10:37:55
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Divers
Thread ID:
00448788
Message ID:
00448796
Vues:
13
>Hi all,
> I'm looking for a relatively easy way to identify if a character field contains only numbers. My application is testing for valid/real postal addresses and one of the checks I'd like to make is if the field contains nothing but numerical data. Can anyone point the way?
>TIA,
>Pete Adams


1. You can use
ISDIGIT()
function to check each character in the character field.

2. You can conver value in the character field to a number than back to character and compeare with source
ALLTRIM(STR(VAL(Myfield))) == ALLTRIM(Myfield)
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform