diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-12-23 06:53:22 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-12-23 06:53:22 -0800 |
commit | 7aacecd153ecfdd7b5c480dc419d4823e896ef1c (patch) | |
tree | c269c4ba9d46628a2d92989ebbe8ad3cad08ec52 /txr.1 | |
parent | cb1b866fcd40a733d4c0e4a3cfe3249e2f1df1f8 (diff) | |
download | txr-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.1 | 17 |
1 files changed, 15 insertions, 2 deletions
@@ -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 |