Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Any numeric result is possible ?
Message
De
14/10/2003 11:57:59
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Any numeric result is possible ?
Divers
Thread ID:
00838576
Message ID:
00838576
Vues:
74
Hi ,

After reading Sergey Message #838548 and mskb #258998
i test numeric behaviour.
CLEAR
SET DECIMALS TO 18
SET FIXED ON
lnDiff = {^2000-03-20 11:31:00} - {^2000-03-20 10:25:00}

zz=3959.999965131283
ww=m.zz+0.000000000000
* i cannot see any difference with DISPLAY MEMORY
DISPLAY MEMORY LIKE lnDiff
DISPLAY MEMORY LIKE zz
DISPLAY MEMORY LIKE ww
* i cannot see any difference with direct print
? lnDiff,ww,lnDiff-ww
* but INT() see a internal difference and not return aspected value
? INT(ww),INT(lnDiff)

* changing syntax for identical computation, change return value

? INT(lnDiff+0.0),INT(lnDiff+0.00),INT(lnDiff^1)
? MOD(lnDiff*1,1),MOD(lnDiff*10,1),MOD(lnDiff*100,1)
? BETWEEN(lnDiff,3960,3960.00),BETWEEN(lnDiff,3960.00,3960)
* i can continue
On past i know this:
numeric variable have a value,
and have a format set by origin value used for display

Now i known this:
numeric variable have a value,
and have a format set by origin value used for display
AND VFP FUNCTIONS USE VARIABLES VALUE, VARIABLES FORMAT AND SCRIPT
SYNTAX FOR RETURN THE RESULT.

But the format of variable is invisible.

Fabio
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform