So far so good in the application currently in development, I feel
like I'm in the home stretch. However something has come up which
could prove to be a roadblock in the near future. There are some
values which need to be totaled up and some of those need decimals.
Now I realize that the int datatype doesn't deal with that, and the
only thing I've seen thus far which fills the same purpose as a double
datatype is the Number datatype. However when I try something like this:

for(var i:int; i < n; i++)
        {
        total2 += dgProvider[i].ProductList;
        total3 += dgProvider[i].Cost;
        }

If total2 and total3 are of the Number datatype, the result will
display as NaN or "Not a Number". This works fine however if total2
and total3 are declared as int. What I'm wondering is, are numeric
values drawn from a database (SQL Lite here) automatically cast as
int? Even if the database has them as NUMERIC and not INTEGER? If so,
then would I be able to work around this by doing something like this?

for(var i:int; i < n; i++)
        {
        total2 += Number(dgProvider[i].ProductList);
        total3 += Number(dgProvider[i].Cost);
        }

I'm just asking for some clarification on this before I finally get
around to it after finishing up a few things on this project. Thanks
in advance,

Brian Ross Edwards
Tech-Connect LLC

Reply via email to