summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
Diffstat (limited to 'txr.1')
-rw-r--r--txr.112
1 files changed, 11 insertions, 1 deletions
diff --git a/txr.1 b/txr.1
index 1b360ea8..8ba7afaf 100644
--- a/txr.1
+++ b/txr.1
@@ -3295,9 +3295,11 @@ like this:
@(end)
Repeat has four types of special clauses, any of which may be
-specified with empty contents, or omitted entirely. They are explained
+specified with empty contents, or omitted entirely. They are described
below.
+Repeat takes arguments, also described below.
+
All of the material in the main clause and optional clauses
is examined for the presence of variables. If none of the variables
hold lists which contain at least one item, then no output is performed,
@@ -3381,6 +3383,14 @@ are none, or none of them activate, then @(last) is considered. If none
of those clauses are present or apply, then the repetition is processed
using the main clause.
+Repeat supports an optional keyword argument:
+
+ @(repeat [:counter <symbol>])
+
+This designates a symbol which will behave as an integer variable over the
+scope of the clauses inside the repeat. The variable provides access to the
+reptition count, starting at zero, incrementing with each repetition.
+
.SS Nested Repeats
If a repeat clause encloses variables which holds multidimensional lists,