Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
InputMask issue.
Message
From
27/01/2005 13:13:04
 
 
To
27/01/2005 12:19:13
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
00981243
Message ID:
00981304
Views:
29
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform