while.rst 467 B

1234567891011121314151617
  1. while
  2. -----
  3. Evaluate a group of commands while a condition is true
  4. ::
  5. while(condition)
  6. COMMAND1(ARGS ...)
  7. COMMAND2(ARGS ...)
  8. ...
  9. endwhile(condition)
  10. All commands between while and the matching :command:`endwhile` are recorded
  11. without being invoked. Once the :command:`endwhile` is evaluated, the
  12. recorded list of commands is invoked as long as the condition is true. The
  13. condition is evaluated using the same logic as the :command:`if` command.