Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Strange failures of basic functions 1

Status
Not open for further replies.

jmswe

Programmer
Feb 14, 2002
31
GB
Hi

I have a fairly large algorithm (about 700 lines) and have some strange problems. Namely: the regular compare operation does not work... that is "if n > hits then ..." does not execute even do n > hits.

I have done checks by doing a response.write belov the if statement and it prints n = 126 hits = 125...

I guess there could be some other error in the code that makes asp go wild but i dont get any other error..

 
try converting both values to Int before comparing them
Code:
If CInt(n) > CInt(hits) Then
...
Tony
reddot.gif WIDTH=500 HEIGHT=2 VSPACE=3

 
wow.. looks like that would work.

I thought asp was fail proof autoconverting types... :)

thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top