Function WaitExprTrue

Top 

 

Declaration:

void WaitExprTrue(char str[]);

Description

Suspends execution of the script file until the expression specified in the str line becomes True as the result of executing.

The expression operands should be available in the continuous emulation mode, otherwise the expression is always False.

An operand value poll is executed within the specified time interval. Therefore, the expression should remain True during this interval, otherwise the programmer cannot trace the moment, when the expression becomes True.

Note. You should not precede the variable names with '$' sign in the expression string.

Example:

while (1)     // the endless cycle

{

  WaitExprTrue("Counter > 200");             // to wait for the condition to become True

  Stop();                                    // to stop the program

  printf("Counter overflow at %04X", $PC);  // to display the message

}