summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-09-24 07:23:58 -0700
committerKaz Kylheku <kaz@kylheku.com>2016-09-24 07:23:58 -0700
commit97870898a2491242223a64715871cec339c42517 (patch)
tree78cb5f58277872819d67fa82d48ef10967ec8413 /txr.1
parentc99a38dde59aa8b0c2496fef092a93e324ec3e33 (diff)
downloadtxr-97870898a2491242223a64715871cec339c42517.tar.gz
txr-97870898a2491242223a64715871cec339c42517.tar.bz2
txr-97870898a2491242223a64715871cec339c42517.zip
awk macro: use range test logic for clause conditions.
* share/txr/stdlib/awk.tl (sys:range-test): Function renamed to sys:awk-test, since it's not just for ranges. (sys:awk-let): Uses of sys:range-test follow rename. sys:awk-test introduced into expansion of cond parts of cond-action clauses. * txr.1: Documented new behavior (conditions can produce a function or regex, which is implicitly invoked on rec).
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 d57dd04f..b77f6b52 100644
--- a/txr.1
+++ b/txr.1
@@ -38320,7 +38320,17 @@ variable, and various
variables are updated. Then, the condition-action clauses are processed, in the order
in which they appear. Each
.meta condition
-is evaluated. If it yields true, then its associated
+is evaluated. If the resulting value is a regular expression
+or a function, then this regular expression or function is invoked on the value
+stored in the record variable
+.codn rec ,
+and the result is taken to be the truth value of
+.metn condition .
+Otherwise, if the resulting value of
+.meta condition
+is other than a function or regular expression, it is taken directly
+to be the truth value.
+If the condition is true, then its associated
.meta action
forms are evaluated. Either way, processing passes to the next condition
clause (unless an explicit step is taken in one of the