Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Checking integer
Message
De
27/05/2003 08:06:22
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00793017
Message ID:
00793026
Vues:
23
This will not work if the value is a numberic type. To use this technique, you'll have to check the vartype and convert it to a string if necessary.
local lcValue as String

if vartype(This.Value) = 'N'
   lcValue = transform(This.Value)
else
   lcValue = This.Value
endif

if "." $ lcValue
   ** do whatever you need
endif
>Try something like this in the valid...
>
>
>IF "." $ THIS.VALUE THEN
>	RETURN .F.
>ENDIF
>
>
>>Who can help me?
>>How can I check if the variable is integer or numeric.
>>For example: if the user entered 2 so it's O.K, if the user entered 2.5 he will get messagebox with some message.
>>Thank you for helping
>>Chaim
Thanks,
Dan Jurden
djurden@outlook.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform