Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Divide by Zero
Message
 
 
To
02/08/2002 11:10:09
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00685463
Message ID:
00685466
Views:
16
What Vfp version are you using? Anyway, divide by zero shouldn't shutdown VFP. Are you sure that it isn't something else? Can you reproduce it from command window?
Try
lcExpr = < your expression >
IF TYPE(lcExpr) <> "N"
  * Bad expression
...
>Hi All
>
>I have a strange division by zero problem. Normally a division by zero will result in **** or a normal VFP error message. However, I am trying to offer my users the ability to create their own formulas which can consist of calling VFP functions and my own functions. For instance they can enter a formula such as Func1() / Func2() which my program then Evaluates().
>
>If this formula results in a division by zero then VFP just exits - totally, completely, no messages, no errors, nothing - gone. I cannot trap for it using the normal ON ERROR. The exe simply quits.
>
>Any ideas how I can trap this?
>
>TIA
>
>Jos
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform