Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Only currency is sure computation decimals values ?
Message
From
11/06/2003 10:30:06
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
11/06/2003 09:49:10
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00798893
Message ID:
00798924
Views:
44
>Hi,
>
>I suspected from much time, but me it seemed impossible.
>
>
>CREATE CURSOR TEST (b B DEFAULT 0.1,n N(18,4) DEFAULT 0.1,y Y DEFAULT $0.1)
>FOR I=1 TO 10000000
>	APPEND BLANK
>NEXT
>SELECT ROUND(SUM(b),4) sb,sum(y) sy,sum(n) sn FROM test INTO CURSOR result
>
>? TRANSFORM(sb+0.000000000000000)
>? sn
>? sy
>
>
>Where it is my error?
>
>Fabio

Fabio,
CREATE CURSOR TEST (Amt i,b B(5),n N(18,5),y Y)
for ix=1 to 100
 insert into test values (ix,ix/100000,ix/100000,ix/100000)
EndFor

SELECT sum(amt) amt,sum(b) sb,sum(y) sy,sum(n) sn ;
 FROM test ;
 INTO CURSOR result
 
? amt, sb, sn, sy 
IOW we're just wasting time.
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform