Re: for conditional handling question



sandeep wrote:
) Eric Sosman writes:
)> In other words, a "for" statement does:
)>
)> 1: If `e1' is present, evaluate it. (And bring into existence
)> any variables it happens to declare These variables live as
) long as
)> the loop is executing, and cease to exist when it terminates
) for any
)> reason.)
)>
)> 2: If `e2' is present, evaluate it. If it evaluates to zero,
)> terminate the "for" and skip to whatever follows the body.
)
) I believe it is more correct to say that e1 and e2 are evaluated whether-
) or-not they are empty. It just happens that evaluating an empty
) expression has no effect and yields a TRUE value.

You believe wrongly. As an example:

if () { /* something */ }

The ability to not have expressions is quite specific to for-loops.


SaSW, Willem
--
Disclaimer: I am in no way responsible for any of the statements
made in the above text. For all I know I might be
drugged or something..
No I'm not paranoid. You all think I'm paranoid, don't you !
#EOT
.