Originally posted by deb platt: As an aside, the numerator and denominator that are being treated as integers were actually doubles when last seen leaving the server.

They never leave the server.

For completeness, please show the code where you set the scoped variables. [ December 16, 2008: Message edited by: Bear Bibeault ]

num and denom were the result of a number of mathematical operations. However the initial operands were real numbers selected from a database query. So when I said that the numbers were real numbers when they left the server, I meant that the queried numbers were real numbers in the database server.

Here's the code that set num and denom:

To set any of the variables ending with the suffix "sum" I began with a statment such as this:

Perhaps I should have initialized it to the value "0.0".

Then there is a loop where I am accumulating the sum from a query, like this:

In the above snippet, the numbers in row[3] and row[4] should be real numbers.

In most cases the ratio I am seeking works out, but in those cases where the numerator and denominator coincidentally do not have a fractional part, I get integer division, and the ratio is misleadingly reported to be zero. [ December 17, 2008: Message edited by: deb platt ]