Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Transform() ?
Message
De
08/12/2001 07:34:05
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
07/12/2001 13:34:50
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Titre:
Divers
Thread ID:
00591318
Message ID:
00591643
Vues:
23
>What's wrong with this (in both VFP6 and VFP7):
>
>? TRANSFORM(18.1234567,"99.9999%")
>
>it show 18.1200%
>
>Should it be 18.1234% ?
>
>TIA
>
>Jun

Transform() respects decimals and like str() it rounds the value to the given decimals.
With decimals 4 setting transform would return same as str(,7,4) where both requests roundation to 4th. If what you really want is 18.1234% and not 18.1235% than still way to go is transform. With no mask defined transform returns char representation of number whatever the decimal setting is. You apply another transform to apply the mask :

?transform(transform(18.1234567),'99.9999%')

Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform