|
Monday, 09 March 2009
|
|
HTML clipboard
where:
expression - used to test the loop-termination expression. This
expression can be implicitly converted to a bool tye or some other type
that has a overloading of the true and false operators.
statement - a single or block of statements that are to be executed.
Key Points:
Since the expression that is tested (loop-termination
expression) before even one iteration of the loop, a while loop can
potentially execute zero or more times. You may terminate a while loop with a: break, goto, return or throw. A neat little trick is to use the continue statement which will take control to the next iteration of the loop without actually exiting the loop.
HTML clipboard
|
|
Last Updated ( Monday, 09 March 2009 )
|