Posted: Sat Sep 09, 2006 11:01 pm
These are all very interesting solutions, especially this last one. SP I will recommend you use what ever is the most readable. All these fancy tricks are nice but are all no-no's in coding practices. Things such as a=1-a are not easy for others (or even yourself 6 months later) to see what a=1-a actually is intended to do (invert a boolean value). I recommend doing whatever is most straight forward to read or write some good comments for yourself about what the semantics of the particular line is.