Re: Difficulty with Relatively Simple IF Structure

"monir" <monirg@xxxxxxxxxxxx> wrote in message
e p chandler;

Thank you for the attempt.

Your suggested modifications are in error since they represent two
serious misinterpretations of what the nested IF supposed to do:
A) If the condition is TRUE in the outermost IF, then exit the nested
IF block, and continue for the next "i" of the DO loop.
NOT "quit the DO loop".

It exits the inner DO loop, not the outer one, and the code
appears to be equivalent to yours.

B) In either branch of the inner IF, a new bisection attempt MUST be
followed by calling the integrator QROMO() to obtain the corresponding
new value of "res" before re-testing the condition.
You need GO TO 11 once you enter either branch of the inner IF.

His code does NOT require GO TO 11,
because that is covered by the DO loop that he introduced.

You would need to review the simple description of the logic behind
the intended nested IF (Item 4. of my previous post, Dec 03, 2008,
11:35 am).

You need to actually DO what has been suggested.