Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Numbers concatenating

 
Logged in as: Guest
arrSession:exec spGetSession 2,3,993
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> ASP >> Numbers concatenating
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Numbers concatenating - 3/28/2004 1:38:56 PM   
  cittoner

 

Posts: 1
Score: 0
Joined: 3/28/2004
From:
Status: offline
I am writing a program for school that sends 5 grades to an asp page and in the vbscript, I have dimmed 5 variables and equalled them to the input text boxes on the form where you input your 5 grades. That works fine, however when I send the variables into a function to get the average the + operator keeps concatenating the numbers on me, instead of adding them together. I know when you use the + operator you don't know if it will add or concatenate unless the expressions are numerical. So I was wondering what the problem was and if anyone had any suggestions for me. I would greatly appreciate it.
 
 
Post #: 1
 
 Re: Numbers concatenating - 8/17/2004 10:08:02 PM   
  Matt

 

Posts: 30
Score: 0
Joined: 8/17/2004
From: United Kingdom
Status: offline
IT sounds like you have Numbers in strings
Use the Int function to get the integer value out of the string.

(in reply to cittoner)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> ASP >> Numbers concatenating Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts