[thelist] ASP: cInt() VS int()

Sean G. ethanol at mathlab.sunysb.edu
Tue Aug 20 20:28:01 CDT 2002


Howdy,

I'm guessing int is short for integer (whole numbers and zero, hence no
decimals).  You probably want something along the lines of decimal or float,
or depending on your platform, the money data type.

HTH,


Sean G.


BTW, in some MS environs (I know SQL server is one) any math functions on an
int variable yield an int result, hence int plus a decimal equals an int,
dropping any part of the decimal right of the point.


> -----Original Message-----
> But I just discovered that int() is dropping everything after the
> decimal. MSDN's docs say that it's designed to do that (another
> "feature" I guess), but I'm doing multiplication with currency, and I
> need the part after the decimal!





More information about the thelist mailing list