Am I nuts or ignorant (both very possible) or does this code do nothing?
I support a legacy site written by a third-party company, so there really is no one associated with the site that I can ask.
I understand that they iterate over the recordset and get the number of the last record. But I do not understand what the if block does. The psuedocode seems to say: "If I have a number and subtracting the same number from it, dividing it by four, and then multiplying by four, and it is not zero ... then"
When can it not be zero (except when you generate division by a zero error)? <- ignore this, I thought back, you could get 0/4, but not 4/0. The question remains.
The only thing I can think of is that the record number was negative? Is it possible that I do not pretend to be an expert in ASP Classic, but I don’t know what might happen.
Does anyone know what I don't see here?
do while not rs.EOF recordNum = recordNum + 1 rs.MoveNext loop rs.MoveFirst if recordNum-((recordNum\4)*4) > 0 then recordNumber = (recordNum\4)+1 else recordNumber = (recordNum\4) end if
valis source share