Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Divide by Zero
Message
 
 
À
02/08/2002 11:10:09
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00685463
Message ID:
00685466
Vues:
17
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--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform