On September 25, 2007 at 02:42, estech said...
I think you are mistaken. Any Flag Operation (clear,
set, toggle, test) can be programmed into a macro at any
time.
Okay.
However, the order in which they are executed will
obviously affect the course of the program. It wouldn't
make sense to execute a Flag-Test without some previous
intentional Flag operation.
Not at all true. You operate the Flag Test to determine the state of the Flag so that the next command,
IF flag is set do this, ELSE do that
will know the state of the flag. If you don't do the Flag Test, the IF/ELSE command will always act as though the flag has not been set.
The Flag-Test is an If statement. The operation(s) performed
are determined by the condition of the flag being tested.
No, the Flag Test is "Tell me which state the Flag is in." Once that is known, IF/ELSE statements can work with the now known flag state.
What still doesn't make sense to me is that the Flag Test is needed at all. I would think that the operation of "IF Flag is Set" would include looking at the flag to see if it is set, but it doesn't. That's what I said that I think is dumb.
Hey, maybe I'm wrong about this. But my experience has been that IF/ELSE statements work when preceded by a Flag Test and don't work when not.
And don't forget to include the command that sets or unsets the flag to be ready for the next process.