Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Behavior change to TRANSFORM() in VFP7
Message
De
07/10/2004 08:55:39
 
 
À
07/10/2004 04:01:41
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00949444
Message ID:
00949494
Vues:
40
>I have noticed a behavior change in the TRANSFORM() function in VFP7.
>
>In VFP6,
>
>? TRANSFORM(0.20)
>0.2
>
>But in VFP7 (I'm running SP1)
>
>? TRANSFORM(0.20)
>0.20
>
>This is causing me quite a problem, does anyone know why I'm getting this result and how to rectify it? Is this behavior also in VFP8? The help file still states that trailing zeros after a decimal point should be truncated.
>
>Neil Shumsky

Yes for VFP8 and VFP9.
?  RTrimZero(TRANSFORM(0.21))
?  RTrimZero(TRANSFORM(0.20))

* on VFP9 this is implemented on RTRIM()
FUNC RTrimZero(s)
RETURN LEFT(m.s,LEN(RTRIM(CHRTRAN(m.s,'0',' '))))
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform