Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to check for ***********************
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00389944
Message ID:
00390019
Vues:
10
>>I did a calculation that divided by 0 and left me with all asterisks ******* >>in the answer, which I understand why, but how can you check for all >>asterisks in a result variable after the computation?

Try this -- if your field name is nMyNum, call "IsGoodNumericVal(nMyNum)" to determine asterisks (and nulls) from real values.


PROCEDURE IsGoodNumericVal(tnFieldValue)
LOCAL llRetVal

DO CASE
CASE NOT VARTYPE(tnFieldValue) == "N"
llRetVal = .F.
CASE tnFieldValue + 1 = tnFieldValue
llRetVal = .F.
OTHERWISE
llRetVal = .T.
ENDCASE

RETURN llRetVal
ENDPROC
The whole problem with the world is that fools and fanatics are always so certain of themselves, but wiser people so full of doubts. - Bertrand Russell
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform