Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is it a bug in PowerBuilder 7.0

Status
Not open for further replies.

smaller

Technical User
Aug 30, 2001
5
CN
I find the float in PB perhaps errors!
for example, truncate(2.37,2)=2.37. In PowerBuilder, the data 2.37 is stored as 2.369999885559082, so I get the result is 2.36; round(0.35,2)=0.35. But In PowerBuilder, the data 0.35 is stored as 0.3449999988079071, so I get the result is 0.34. However I can use the state truncate(round(2.37,3),2)=2.37 to get the right result, but I can't get the right result round(0.35,2)=0.35.It is only one example.
I think dealing with the problem by the way isn't good, and I can't solve them.
In any other computer language , programmer don't meet with the problem. I think these problems should be dealed with the PowerBuilder.
If you can help me , let me know. thank you very much!
 
I think u have got the same problem as i had. So in data window go in the column property, in which the problem is there, and set the limit of the no. of character/number can be entered. and the format also. U may get the right result.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top