mccabec123, on 16 June 2012 - 07:56 PM, said:
To exit the loops you can use a 'break;' or a 'return 0;', better to use a break though if you can, unless you do want to return to where the function was called.
Curious as to why you'd recommend using a break to exist a loop at all? Don't mean to second guess you, I just never saw the virtue in doing so...if the logical criteria that determine entry/exit are properly established, a break should never really be necessary. Plus it creates 2 ways to get out of a loop, and thus more potential for bugs. Do you have a different perspective?

New Topic/Question
Reply





MultiQuote




|