Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
BUG: Deterministic function return not deterministic val
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00838784
Message ID:
00839560
Vues:
40
>Hi George,
>
>I run on XPSP1 ita, VFP6SP5 or VFP7SP1 or VFP8SP1 with:
>or Regional System Setting
>or American
>or Italian
>
>Also this:
>
>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}+0.0
>zz={^2000-03-20 11:31:00} - {^2000-03-20 10:25:00} + 0.00
>
>* 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.
>
>print:
>
>.T. .T.
>.F.
>
>
>????? why you have a .T. ?
>
Fabio,

I don't know. What I do know, however, is this. You're forcing VFP into double precision floating point math. Datetimes are limited to accepting integers. In essence, you're expect the same results. Not gonna happen. What's wrong with using the INT() or ROUND() functions?
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform