I haven’t really understood the difference between

i++ and ++i

  • @stopit
    link
    13 years ago

    my understanding…(I’m very new and trying to learn) - is that there would be no difference if that statement (i++; or ++i;) were used alone on a line…am I correct in this?

    • @freely
      link
      23 years ago

      If both were the only statement, then yes they are equivalent because nothing is being done with the returned value either way. The difference only really matters if you’re using the returned value.

      • @stopit
        link
        13 years ago

        yay! I’m slowly making progress!