On 2008-11-02 01:06:17 -0400, Jerry Coffin <jc*****@taeus.comsaid:
>
In this case, it's calling "IsRuleNodeRoot", which apparently looks at a
node, figures out whether it's a root node, and sets some sort of semi-
boolean (a pointer to which is passed as a the second parameter) to tell
you that result. In this case, that variable (isRoot) is evaluated as
the right operand of the comma operator, so what it's doing it calling
the function to set the variable, then evaluating the variable itself to
determine whether it's reached the root yet, and continuing the loop
until it reaches the root.
In other words, that comma operator is a workaround for a design error:
there should be a function that returns a boolean that can be used
directly.
--
Pete
Roundhouse Consulting, Ltd. (
www.versatilecoding.com) Author of "The
Standard C++ Library Extensions: a Tutorial and Reference
(
www.petebecker.com/tr1book)