I have programmed in C, Pascal, GWBasic, TCL, Perl, Lisp, but Visual Basic is too advanced for me.
FOR j = 1 TO 31
output_to_webpage "<p>Counter is " + j + "</p>"
myDay = "" + j
IF j < 10 THEN myDay = "0" + j
MyStr = MyStr + ",j"
NEXT
The loop never appears to happen. Although if I comment out any references to the loop variable, j
, it appears to loop.
How can I actually make Visual Basic loop. Or error. Not silently pretend there's no FOR
loop there at all?
update: if the first statement of the loop was just a simple debugging statement I would expect it ALWAYS to be executed at least once, even if the rest of the loop was aborted. However, as pointed out below, the use of arithmetic on the loop variable somehow causes the entire loop not to be executed even once. Not even an initial debugging statement inside the loop. Very very strange I would think.