Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
InputMask issue.
Message
De
27/01/2005 13:13:04
 
 
À
27/01/2005 12:19:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
00981243
Message ID:
00981304
Vues:
31
>I'm not sure what you're asking as you stated that the output you got was expected and preferred.
>
>The input mask does nothing to round. It states that you can input data that looks like what the mask defines. In your case, the mask says you can enter three digits to the left of the decimal point. It won't allow the fourth to even be entered. How could VFP even know about the fourth digit to round up?

Craig,
no ambiguity exists here, only a design choice.

Input data can have 3 decimals, then it's value is round(,3) surely;
but calculated values can have 4 or more decimals.
If InputMask is only a passive numeric Mask ( like VFP ) you see the TRUNC value,
if InputMask is a active numeric Mask, you see a ROUND()

VFPT choice is for passive numeric.
This is visible in TRANSF()
? TRANSFORM(123.2336,"@R 9999.999")
SET DECIMALS TO 4
? TRANSFORM(123.2336,"@R 9999.999")
SET DECIMALS TO 2
? TRANSFORM(123.2336,"@R 9999.999")
Fabio
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform