Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Vartype: behavior
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00136852
Message ID:
00139682
Views:
38
>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform