diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2020-07-11 14:44:19 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2020-07-11 14:44:19 -0700 |
commit | a6f6072761d124c60793325bc512048b0f31f5a3 (patch) | |
tree | d7cbb320dd5ffdd58afe9f2588c876141caca261 /txr.1 | |
parent | 812e63ca8f42637f6a856e66f57678cbb0472821 (diff) | |
download | txr-a6f6072761d124c60793325bc512048b0f31f5a3.tar.gz txr-a6f6072761d124c60793325bc512048b0f31f5a3.tar.bz2 txr-a6f6072761d124c60793325bc512048b0f31f5a3.zip |
listener: new *-1, *-2 ... *-20 macros.
* arith.h (minus_s): Declared.
* eval.c (reg_symacro): Changing to external linkage.
* eval.h (macro_time_s, reg_symacro): Declared.
* parser.c (repl): Bind the *-1 to *-20 symbol macros.
* txr.1: Documented.
Diffstat (limited to 'txr.1')
-rw-r--r-- | txr.1 | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -73541,6 +73541,25 @@ Thus, up to the previous hundred results can be referenced: 10 .brev +.coNP Symbol Macros @, *-1 @, *-2 @, ... @ *-20 +The listener provides small number of symbol macros for referencing the +results of previous commands in a relative. The macro +.code *-1 +refers to the value of the immediately previous command. The macro +.code *-2 +refers to the value of the command before that one and so on. + +Note: each of these macros expands to a reference to the +.code *r +vector, according to the following pattern: + +.mono + *-1 --> [*r (mod (- *v 1) 100)] + *-2 --> [*r (mod (- *v 2) 100)] + ... + *-20 --> [*r (mod (- *v 20) 100)] +.onom + .coNP Variable @ *n .desc The listener variable |