Sandpanther (sandpanther) wrote,

  • Mood:

Code Weirdness

This is mostly addressed to Slothman , but anyone can feel free to join in on the fun if they wish.

What is the purpose of this code:

For i = 1 to 1

< stuff happens in here>


Check me if I'm wrong, but this only executes once. So that would be functionally equivalent to if just the were done without the enclosing for-next loop, yes?

I ask mainly because I've seen it in the code I inherited several times, and have been wondering what deep and important point I'm missing here. 'Cause just looking at it, that code looks mighty stupid to me.

Back to figuring out why anyone would want to compare something they always know will equal 1 to something which may or may not be 1, and pondering why they didn't just compare the thing to 1 instead of some variable which (after much research) I know will always be 1. (Great indeed are the mysteries of the universe...)
  • Post a new comment


    default userpic
    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.