Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Vartype: behavior
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00136852
Message ID:
00139682
Vues:
37
>>It is UNcool, in my humble opinion, for any command/function/etc to deliberately cause any EXCEPTION at any time.
>
>OK, then what should x = 1/ 0 do?
>
>At some point, we just gotta accept that we have to learn the language (incorrect documentation doesn't help, of course), and not expect to be protected from every incorrect use.

Not sure if you've tried it in VFP, but division by zero doesn't give the results you might expect. Unlike most languages, VFP does not throw an exception, rather gives x an infinite value. Try this:
x = 1 / 0
?x
x = x + 1
?x

You won't get an error. What's even more interesting:
y = 1/0
y = y*(-1)
x = 1/0
?x=y
?x>y

I know its off subject, but might be relevant when guessing at the fox team's past philosophy at exceptions.
Erik Moore
Clientelligence
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform