I'm trying to figure out what's wrong with this code snippet.
I'm not sure what to make of this one? is it just written wrong? Or does it just not do anything?? ?? I think true is being assigned to done, then ! done is being assigned to done. So now done holds the value ! done and gets tested at the top again....argh. Not sure here.
Or is the error that it should be (done == true)?? Can an assignment be used as an expression? Is that the error?
Code:
while (done = true)
done = ! done;
I'm not sure what to make of this one? is it just written wrong? Or does it just not do anything?? ?? I think true is being assigned to done, then ! done is being assigned to done. So now done holds the value ! done and gets tested at the top again....argh. Not sure here.
Or is the error that it should be (done == true)?? Can an assignment be used as an expression? Is that the error?