Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


simple comparison not working

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

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> simple comparison not working
  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 >>
 simple comparison not working - 6/27/2002 11:38:31 AM   
  carmenl

 

Posts: 3
Score: 0
Joined: 6/25/2002
From:
Status: offline
This is a snippet of code that is causing me a lot of grief! It will not execute, and I have checked that there are values that would definetely pass the condition.

Can anyone spot my problem?

Thankyou!


'if the total is over the daily capacity (these values are all integers)
if total_tons(colno,day_counter) > daily_cap(colno) then
diff = total_tons(colno,day_counter) - daily_cap(colno)
response.write(category(colno) & " is over by " & diff & " on day " & day_counter) & "
"
end if
 
 
Post #: 1
 
 Re: simple comparison not working - 7/2/2002 1:09:53 AM   
  imav8n

 

Posts: 95
Score: 0
Joined: 7/3/2001
From: USA
Status: offline
It's hard to tell with the little bit of code you posted. Are you returning integer values from the functions total_tons and daily_cap?

It looks like your pulling colno from a database (I think this because of the syntax: category(colno) but I'm not sure)...if so, is that an integer as well? Try using the CInt function to make sure that everything you think is an integer actually is...

For information on CInt and other functions, see the vbscript portion of www.devguru.com

~imav8n
Failure is not an option.....it comes bundled with the software.

(in reply to carmenl)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> simple comparison not working 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