TIP: Click on subject to list as thread! ANSI
echo: foxpro
to: GERRY DANEN
from: STEVEN READ
date: 1997-04-25 22:27:00
subject: Foxpro 2.5 win transform(

On 04-18-97 (11:54) GERRY DANEN wrote to ALL
About FOXPRO 2.5 WIN TRANSFORM(
GD> I've got the strangest thing happening in FP2.5 for Windows.
GD>         amt = 8999.98
GD>         ? transform(amt, '999,999.99')
GD> and I get this result:
GD>         9,000.00
GD> Can anyone confirm this?  Is this a known bug?  The
Not a bug.  Probably your SET DECIMAL TO command is your
culprit.  You want two decimals in your TRANSFORM() but
have SET DECIMAL set to less than two decimals.  Sounds
like the SET DECIMAL statement wins the arguement.
* Comfirmed the results from as far back as FoxBASE+ 2.10
* up thru FoxPro 2.6 for DOS/Win
amt = 8999.98
set decimal to 0
? transform(amt, '999,999.99')
* -- prints 9000.00
set decimal to 1
? transform(amt, '999,999.99')
* -- prints 9000.00
set decimal to 2
? transform(amt, '999,999.99')
* -- prints 8999.98
Later,
Steve,  in western New York state (USA)
---
 * QMPro 1.53 * stevenreadpcohiocom "junk mail fouler"
--- InterEcho 1.19
---------------
* Origin: PC-Ohio PCBoard * Cleveland, OH * 216-381-3320 (1:157/200)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.