summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-03-28 19:14:53 -0700
committerKaz Kylheku <kaz@kylheku.com>2015-03-28 19:14:53 -0700
commit084bde656bac142bba5311b519c7bb78e2c45dad (patch)
tree4966a7893b0d06768ca530ebf6ed97fe4d3c8a28 /txr.1
parent051bf360110a5b9649fe9a2b5b35b2dcfed868d6 (diff)
downloadtxr-084bde656bac142bba5311b519c7bb78e2c45dad.tar.gz
txr-084bde656bac142bba5311b519c7bb78e2c45dad.tar.bz2
txr-084bde656bac142bba5311b519c7bb78e2c45dad.zip
* eval.c (prinl, pprinl): Become external functions.
(tprint): New function. (eval_init): Register tprint as intrinsic. * eval.h (prinl, pprinl, tprint): Declared. * txr.c (txr_main): New option, -t. * txr.1: Documented tprint and -t option.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.141
1 files changed, 41 insertions, 0 deletions
diff --git a/txr.1 b/txr.1
index 8c654150..daf29a76 100644
--- a/txr.1
+++ b/txr.1
@@ -618,6 +618,13 @@ but prints using the
.code pprinl
function.
+.meIP -t < expression
+Like
+.code -p
+but prints using the
+.code tprint
+function.
+
.meIP -C < number
.meIP >> --compat= number
@@ -22256,6 +22263,40 @@ which is rendered as
.codn #\ex ,
they look like a hex character code.
+.coNP Function @ tprint
+.synb
+.mets (tprint < obj <> [ stream ])
+.syne
+.desc
+
+The
+.codn tprint
+function prints a represntation of
+.meta obj
+on
+.metn stream .
+
+If the stream argument is not supplied, then
+the destination is the stream currently stored in the
+.code *stdout*
+variable.
+
+For all object types except lists and vectors,
+.code tprint
+behaves like
+.codn pprinl .
+
+If
+.code obj
+is a list or vector, then
+.code tprint
+recurses: the
+.code tprint
+function is applied to each element. An empty list or vector
+results in no output at all. This effectively means that an arbitrarily nested
+structure of lists and vectors is printed flattened, with one element on each
+line.
+
.coNP Function @ streamp
.synb
.mets (streamp << obj )