- Code: Select all
post while incrementz == 0
incrementz = 1
i'll post more of the surrounding code if need be, but to start with: how on earth can incrementz == 0 after this code runs?
yes, i understand it's goofy do-nothing code. i'm just trying to understand and debug the while loop logic.
my understanding of this fragment is that a value of 1 is first assigned to incrementz. only after that (because of the "post" modifier), incrementz is evaluated to see whether it is equal to 0. since obviously it never can equal 0 (after all, it was just assigned 1), this code should never loop and the while loop is exited.
but to my confusion, after this code executes, incrementz equals 0, not 1.
what's wrong with my thinking, please?