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!

Pdox 8 vs 9

Status
Not open for further replies.

hcts

Programmer
Jan 14, 2004
89
US
Hi,

I have developed in 8 for years, but we deliver and use 9 runtime for our clients. I like the 9 for it's patches and fixes, but hate the GUI for development. Here's a problem I just ran into.

I have a 401 export program that a client has gotten me to write. Among other things, it takes the employee contribution and applies the employers matching percentage to come up with the dollar amount matched for each employee. My problem is that the two versions round or don't round differently, & I'm not sure why. I can take a simple equation, 33.93*.5 and get two different numbers, a penny off from each other. What's worse, it's the version 9 that is rounding wrong.

Any ideas what's wrong. I have tried to round the value, but it seems like it is already rounded and has lost the .005 that should round it up.
 
They switched from the Borland Compiler to the M$ Compiler from P8 to P9.

The M$ Compiler does less precision.

Only way you might get around it is to create a format of specific presision to use in your calculations.

(Above is quoted from another developer)

Tony McGuire
 
I have noticed that in many M/S Windows applications, particularly spreadsheets the calculations can be quirky.

This is because often time we format a range of fields (spreadsheet) or define a field format (Paradox) specifying how many decimals we want. I have noticed that, although the data displays correctly the software often will still carry out the calculation result to more decimals than your format specifies.

1. As a result of this, a column of formulas in a spreadsheet specifying 2 decimals may not actually sum up (completely accurately) to the same total as the amounts you SEE in the column. It may be off by a few cents.

2. To correct this, I often include the @Round (or equivalent) feature. When dealing with money amounts, for example, I will specify the @round feature to force the calculation results to round to 2 decimal places. That way, what you see is also what is stored internally by the computer.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top