Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dividing by zero
Message
From
21/04/2010 11:51:08
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01461337
Message ID:
01461341
Views:
79
Thanks!

>
>lnResult = TEST1() / TEST2()  &&  <= returns a numeric value with value  ****** and does not fire an error
>
>IF lnResult = (1/0)
>	? "Overflow"
>ENDIF	
>
>>
>>Interesting problem:
>>
>>
>>CLEAR
>>
>>? TEST1() / TEST2()  &&  <= returns a numeric value with value  ****** and does not fire an error
>>
>>FUNCTION TEST1
>>
>>  RETURN(1)
>>
>>ENDFUNC
>>
>>FUNCTION TEST2
>>
>>  RETURN(0)
>>
>>ENDFUNC
>>
>>
>>The calling of two user functions which results in a division by zero does not cause an error and instead returns a numeric value containing asterisks. Q. How to trap for this problem? How to test for result = *****?
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.
Previous
Reply
Map
View

Click here to load this message in the networking platform