View Single Post
Old Jan 13th, 2007, 8:09 AM   #9
grumpy
Programming Guru
 
grumpy's Avatar
 
Join Date: Jun 2005
Location: Adelaide, South Australia
Posts: 1,254
Rep Power: 5 grumpy will become famous soon enough
Quote:
Originally Posted by mrynit View Post
dont do assignments in a while statment like that. the only thing that should be going on in the while(...) is a boolean test condtion.
There is no "should" about it, unless you are working with a zealous style guide.

There is nothing technically wrong with doing an assignment within the while expression.

Non-technically, it is often viewed as bad style because it is possible to introduce unintended errors or problems with code maintenance. Particularly with careless programmers -- but careless programmers will probably not comply with style guidelines anyway.
grumpy is offline   Reply With Quote