Nicodemas
09-23-2005, 10:36 AM
I think I have found an error in IIS, but I'm not sure. Maybe I've just been staring at this code for too long ...
I've attached a text file containing the sub procedure that pages data from a 2d array. However there is one offending section of code that should be working, but isn't!
It is a conditional statement. Based on the arguments that I've passed, this is the conditional:
iTotalPages = 13
iCurrentPage = 13
PAGE_BUFFER = 2
if iTotalPages <= (iCurrentPage + PAGE_BUFFER) then
toNumber = iTotalPages
else
toNumber = (iCurrentPage + PAGE_BUFFER)
end if
The statement evaluates to true, but the variable "toNumber" still sets itself to 15!
I've attached a text file containing the sub procedure that pages data from a 2d array. However there is one offending section of code that should be working, but isn't!
It is a conditional statement. Based on the arguments that I've passed, this is the conditional:
iTotalPages = 13
iCurrentPage = 13
PAGE_BUFFER = 2
if iTotalPages <= (iCurrentPage + PAGE_BUFFER) then
toNumber = iTotalPages
else
toNumber = (iCurrentPage + PAGE_BUFFER)
end if
The statement evaluates to true, but the variable "toNumber" still sets itself to 15!