So the IF conditional expression is evaluated, the THEN segment is initiated, but the WAIT does not cause the execution to idle in the THEN segment - instead the IF segment is continually being evaluated and when it goes false, the THEN segment is halted regardless of the WAIT command.
I think of WAIT in the context of a multi-threaded multi-tasking OS like QNX when I coded in C (showing my age) - I can't recall what the actual command was, but you could block/idle a thread waiting for some condition to go true or a timer to expire before continuing in that segment.
But as you say, the relationship between the IF and the THEN/ELSE isn't sequential, its parallel - the IF is always being evaluated, so a WAIT command in the THEN segment of a program with a quickly changing conditional in the IF segment may never get a chance to execute. So I have to dissociate my IF from my THEN statements to avoid that situation, or as you say, break the program into two pieces as you show. Thanks!!!
My "f11" handle (or my alternate, "feleven") is all over the internet, in most of the forums I've joined since about 1999. It short, easy to spell, and was originally related to my fascination with the F111-F fighter jet.
Rod