summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-12-23 06:53:22 -0800
committerKaz Kylheku <kaz@kylheku.com>2015-12-23 06:53:22 -0800
commit7aacecd153ecfdd7b5c480dc419d4823e896ef1c (patch)
treec269c4ba9d46628a2d92989ebbe8ad3cad08ec52 /txr.1
parentcb1b866fcd40a733d4c0e4a3cfe3249e2f1df1f8 (diff)
downloadtxr-7aacecd153ecfdd7b5c480dc419d4823e896ef1c.tar.gz
txr-7aacecd153ecfdd7b5c480dc419d4823e896ef1c.tar.bz2
txr-7aacecd153ecfdd7b5c480dc419d4823e896ef1c.zip
Base value in :counter
* match.c (do_output_line, do_output): Decode (var expr) syntax as argument of :counter and implement displacement. * txr.1: Documented.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.117
1 files changed, 15 insertions, 2 deletions
diff --git a/txr.1 b/txr.1
index dfcbdf1f..27e72bcd 100644
--- a/txr.1
+++ b/txr.1
@@ -7488,7 +7488,9 @@ using the main clause.
Repeat supports arguments.
.cblk
-.mets @(repeat [:counter << symbol ] [:vars <> ( symbol *)])
+.mets @(repeat
+.mets \ \ \ [:counter >> { symbol | >> ( symbol << expr )}]
+.mets \ \ \ [:vars <> ( symbol *)])
.cble
The
@@ -7496,7 +7498,18 @@ The
argument 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 repetition count, starting at zero, incrementing with each
-repetition.
+repetition. If the the argument is given as
+.cblk
+.meti >> ( symbol << expr )
+.cblk
+then
+.meta expr
+is a Lisp expression whose value is taken as a displacement value which
+is added to each iteration of the counter. For instance
+.code :counter (c 1)
+specifies a counter
+.code c
+which counts from 1.
The
.code :vars