What is 1 + 1?

Results 1 to 3 of 3

Thread: What is 1 + 1?

  1. #1
    Curtis Guest

    Default What is 1 + 1?

    Seriously! =)<BR>When I take 2 variables from rh Form.Request("variable") structure, and then try to add them, I get concatenation as if they were strings. I tried the formatNumber(), but it still does the same thing.<BR>How is this done?

  2. #2
    Join Date
    Dec 1969

    Default RE: What is 1 + 1?

    anything got from request.form is a string.use Cint() to convert to integer.

  3. #3
    Join Date
    Dec 1969

    Default Welll...one caution with that...

    The only problem with using CINT is that it only handles *integers* in the range from -32768 to +32767. Unless you *know* that the user input from the form will be in that range, you might want to use CDBL instead. CDBL handles *any* legitimate number, with or without decimal point, that VBS is capable of working with.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts