ianh@co.pierce.wa.us ("Ian Harding") schreef:
>True, true... but the next time I need the code to fire I would
>need ot remember that I had set it to 1 and set it to something else...
False, false, I've thought of that :-)
The statement says:
dummy = 1 - dummy
a) Initially, dummy == 0. Then dummy becomes 1 - 0 which equals 1.
b) So dummy == 1. Then dummy becomes 1 - 1 which equals 0.
c) Goto a.
Dummy changes value from 0->1 or 1->0 on every execution of the
statement.
If you don't believe it, you can also try dummy = -dummy, but then you
have to remember to initialize it to a non-zero value :-)
--
Vriendelijke groet,
René Pijlman <rpijlman@spamcop.net>
Wat wil jij leren?
http://www.leren.nl/