[thelist] addition vs. string concatenation

Mark Joslyn Mark.Joslyn at SolimarSystems.com
Wed Jun 30 11:58:16 CDT 2004


I have the following expression:

dim intTe, intPL, intCon, intMain
intTE = intPC + intPL + intCon + intMain

The variables are passing in from a standard html form:

intPC = Request.Form("pc")
intPC = Request.Form("pl")
intPC = Request.Form("con")
intPC = Request.Form("main")

Now, my expression is not adding these numbers together, but instead is
string concatenating the results. So, my result looks like this:

(i.e. pc=50, pl=50, con=50, main=50)

50505050 instead of 200.

Is there something I can place in front of the variables to force the
addition. I have tried Cint, isNumeric, cCur, etc. I am not sure why these
variables are coming through as strings while others (from the same form)
are coming through as numbers.

Any help would be appreciated.



More information about the thelist mailing list