WaitWhile

Wait for a condition to return false. While waiting exit the task to allow other tasks to execute. This is only valid inside a task.

Syntax: WaitWhile condition

Example:

Task test()
  
  GO=1		' start and ADC conversion

  WaitWhile GO=1	' wait for the ADC to finish converting

  Result = ADRES	' place the conversion result in global variable "Result"

End Task

Also See: Multitasking