Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
BUG: Deterministic function return not deterministic val
Message
 
 
À
15/10/2003 04:11:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00838784
Message ID:
00839090
Vues:
26
Fabio,

Here's a correction to my original reply. The comment in your code is incorrect it is dependent on the current SET FIXED state:
set decimals to 18
set fixed on

? {^2003-01-01 00:00:00} - {^2003-01-01 00:00:01}
? {^2003-01-01 00:00:01} - {^2003-01-01 00:00:00}

set fixed off
? {^2003-01-01 00:00:00} - {^2003-01-01 00:00:01}
? {^2003-01-01 00:00:01} - {^2003-01-01 00:00:00}
The same result occurs in VFP6SP5, VFP7SP1 and VFP8SP1 so I'd have to believe that this is by design, and probably one of the reasongs that SET FIXED defaults to OFF

>Because i show the problem more clear,
>i open a new Thread ( from old thread #838576).
>
>
>CLEAR
>SET DECIMALS TO 18  && you can put any valid values
>SET FIXED ON        && you can put ON/OFF
>lnDiff = {^2000-03-20 11:31:00} - {^2000-03-20 10:25:00}
>zz=3959.999965131283
>
>* variables are equal
>? m.lnDiff=m.zz , VARTYPE(m.lnDiff,.T.)=VARTYPE(m.zz,.T.)
>* this return .T.,.T.
>
>* same deterministic function INT(),
>* with same input value return different result !!!
>? INT(m.lnDiff)=INT(m.zz)
>* this return .F.
>
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform