From b2ef30979b89bc0e8fa5f90b8bfc7d09ed3e16c2 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Mon, 12 Sep 2016 06:31:50 -0700 Subject: awk macro: more Awk-like treatment of prn args. * share/txr/stdlib/awk.tl (sys:awk-state prn): Use loop instead of simple interpolation, so that we we can individually interpolate each arg into a quasistring. This way if an arg is nil, it turns into nothing rather than the word "nil". * txr.1: Documented this behavior of prn. --- txr.1 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'txr.1') diff --git a/txr.1 b/txr.1 index 2d8e181d..02f62750 100644 --- a/txr.1 +++ b/txr.1 @@ -37778,6 +37778,20 @@ then a call to .code prn with no arguments is the default action. +Each argument +.meta form +is printed by conversion to a string, as if by the expression +.code `@val` +where +.code val +is some variable which holds the value produced by the +evaluation of +.metn form . +Thus if the value is +.codn nil , +the output for that argument is an empty string, rather than the text +.strn nil . + .coNP Macro @ next .synb .mets (next) -- cgit v1.2.3