View Single Post
Old 11-23-2010, 09:28 PM   #19
Happy Monkey
I think this line's mostly filler.
 
Join Date: Jan 2003
Location: DC
Posts: 13,575
Quote:
Originally Posted by Flint View Post
If it is a good password the function cannot return false.
If the password going in is bad, abd the password entered in the function is good, then the function returns false, even though the password is good.
Quote:
No, man. The if condition corrects for it by not calling the function unless it is false.
It calls it no matter what. If that first call returns false, it calls the function a second time (third if you count the loop test).

Every time you call if (!a()), you are calling a().

Quote:
The while loop doesn't correct the behavior, the while loop just exits the loop before the next iteration.
While giving the user two more chances to change the password.
__________________
_________________
|...............| We live in the nick of times.
| Len 17, Wid 3 |
|_______________| [pics]
Happy Monkey is offline   Reply With Quote