diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-09-14 20:52:11 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-09-14 20:52:11 -0700 |
commit | d6f725293fdfd7d28ab5938256866b1fd3b49fe1 (patch) | |
tree | aba89d5ecc7e8dbfd4dea95f3c057e37f0e3f594 /txr.1 | |
parent | 61617da8db174532055801a7ccdc244b8fb80f2e (diff) | |
download | txr-d6f725293fdfd7d28ab5938256866b1fd3b49fe1.tar.gz txr-d6f725293fdfd7d28ab5938256866b1fd3b49fe1.tar.bz2 txr-d6f725293fdfd7d28ab5938256866b1fd3b49fe1.zip |
awk macro: don't bind *stdout* if :output missing.
* share/txr/stdlib/awk.tl (awk): Bind *stdout* only if
awc.output is not nil; i.e. :output has been specified
(with a non-nil argument).
* txr.1: Revised :output documentation.
Diffstat (limited to 'txr.1')
-rw-r--r-- | txr.1 | 19 |
1 files changed, 5 insertions, 14 deletions
@@ -37345,24 +37345,15 @@ clause is processed just after the clause. It must have exactly one argument, which is an expression that evaluates to a string, or else to an output stream. If it evaluates to a string, then that string is used as the name -of a file to open for writing. - -If the -.code :output -clause is omitted, then the current value of the -.code *stdout* -stream is used: the value which that special -variable has on entry into the code generated by the -.code awk -macro. +of a file to open for writing, and the resulting stream +is taken in place of that string. The .code :output -clause has the effect of creating a local binding for the +clause, if present, has the effect of creating a local binding for the .code *stdout* -special variable within the dynamic scope of the -.code awk -macro. This new value of +special variable. +This new value of .code *stdout* is visible to all forms within the macro. If a |