View Single Post
Old 11-23-2010, 11:21 PM   #24
Flint
Snowflake
 
Join Date: Mar 2006
Location: Dystopia
Posts: 13,136
The question is whether evaluating a bool function (for true or false) is the same as "calling" the function and executing the internal code of the function which is conditional on it being true or false. And the answer I am getting is that this is not the same, because my program runs and works.

This code only "calls" passLength IF passLength is false.
Code:
if	(!passLength(password))
	(passLength(password));
If it is false, this gives it another chance to be true. Repeat.

Unlike the solutions graciously suggested by Pete Zicato and Happy Monkey, in my code I do not require a superfluous bool variable. I use the bool function to evaluate itself. Maybe this is "wrong" but it works.
__________________
******************
There's a level of facility that everyone needs to accomplish, and from there
it's a matter of deciding for yourself how important ultra-facility is to your
expression. ... I found, like Joseph Campbell said, if you just follow whatever
gives you a little joy or excitement or awe, then you're on the right track.

. . . . . . . . . . . . . . . . . . . . . . . . . . Terry Bozzio
Flint is offline   Reply With Quote