Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to check for ***********************
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00389944
Message ID:
00390019
Views:
15
>>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
Previous
Reply
Map
View

Click here to load this message in the networking platform