Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dividing by zero
Message
From
02/05/2010 20:02:29
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
28/04/2010 14:43:13
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01461337
Message ID:
01462736
Views:
74
>You'll need to check against both 1/0 and -1/0 (don't know if there are any other specific NaN values we'd need to check). Of course as Thomas suggests, one could use the ABS() function to convert the negative NaN to a positive one.

I don't think there's a difference in fox... at least I didn't, but:
x=1/0
?x=1/0 && .t.
?x=-1/0   && .f.
?-x=-1/0  && .t.
shows that there is. However,
x=1/0
INSERT INTO zz VALUES (-10/0)
?x=num    && .t.
shows that in a field, only abs(nn/0) is stored

And I thought you were joking when you mentioned negative all-stars values.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform