summaryrefslogtreecommitdiffstats
path: root/Help/command/while.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Help/command/while.rst')
-rw-r--r--Help/command/while.rst17
1 files changed, 17 insertions, 0 deletions
diff --git a/Help/command/while.rst b/Help/command/while.rst
new file mode 100644
index 0000000..72c055d
--- /dev/null
+++ b/Help/command/while.rst
@@ -0,0 +1,17 @@
+while
+-----
+
+Evaluate a group of commands while a condition is true
+
+::
+
+ while(condition)
+ COMMAND1(ARGS ...)
+ COMMAND2(ARGS ...)
+ ...
+ endwhile(condition)
+
+All commands between while and the matching endwhile are recorded
+without being invoked. Once the endwhile is evaluated, the recorded
+list of commands is invoked as long as the condition is true. The
+condition is evaluated using the same logic as the if command.