Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dividing by zero
Message
De
02/05/2010 20:02:29
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
28/04/2010 14:43:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01461337
Message ID:
01462736
Vues:
73
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform