Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
TRANSFORM() and decimal places
Message
De
26/11/2003 16:16:00
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
25/11/2003 21:19:50
Cindy Winegarden
Duke University Medical Center
Durham, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00853488
Message ID:
00853877
Vues:
22
>>Can anyone tell me exactly when TRANSFORM() started returning decimal places in .DLLs and not in the command window?
>>
>>All of a sudden clients are calling with issues on our VFP8 SP1 app where TRANSFORM(1234567890123456) returns ***********.**** in the .DLL. We've verified that changing the code to ALLTRIM(STR(1234567890123456,16)) fixes the issue. Not sure why some numbers return and other numbers return "*"s.
>>
>>We just need to verify that there is no alternative but to change TRANSFORM(x) to ALLTRIM(STR(x,16)) in about 1,000 places.
>
>Hi Mike,
>
>What do you have for SET DECIMALS and SET FIXED? Both of these are scoped to the data session. Try this:
>SET DECIMALS TO
>SET FIXED OFF
>? TRANSFORM(1234567890123456)
>SET DECIMALS TO 4
>SET FIXED ON
>? TRANSFORM(1234567890123456)
>The question remains though, why the sudden change in the behaivor of your app. I'm sure these two haven't changed in years.

Seems to be Mike ran into a difference between the regular and dll runtime. And why did it start all of a sudden?

Knowing the apps, I figure there is now more digits in these fields than there were before, and the dll runtime somehow figures these can't be represented as integers anymore, having sufficient number of (significant) digits. So it turns them internally into floating point numbers... which are then represented with decimals. Seems to be the regular runtime doesn't have this problem.

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