summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-01-12 22:49:37 -0800
committerKaz Kylheku <kaz@kylheku.com>2015-01-12 22:49:37 -0800
commitd91ed5da5a5ea74308ad78faec31e03c48b7e767 (patch)
treedc3ce8949503ce1acf4817ea3d941b4dfc5366bc /txr.1
parent0343c6f32c5bd8335e88595cb9d23506625b2586 (diff)
downloadtxr-d91ed5da5a5ea74308ad78faec31e03c48b7e767.tar.gz
txr-d91ed5da5a5ea74308ad78faec31e03c48b7e767.tar.bz2
txr-d91ed5da5a5ea74308ad78faec31e03c48b7e767.zip
* arith.c (zerop): Handle character arguments.
(plusp, minusp): New functions. * eval.c (eval_init): Register plusp and minusp. * lib.h (plusp, minusp): Declared. * txr.1: Documented plusp and minusp, and the handling of characters by zerop.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.127
1 files changed, 26 insertions, 1 deletions
diff --git a/txr.1 b/txr.1
index ab73733e..c26ab041 100644
--- a/txr.1
+++ b/txr.1
@@ -18677,7 +18677,7 @@ The
function tests
.meta number
for equivalence to zero. The argument must be
-a number. It returns
+a number or character. It returns
.code t
for the integer value
.code 0
@@ -18686,6 +18686,31 @@ value
.codn 0.0 .
For other numbers, it returns
.codn nil .
+It returns
+.code t
+for the null character
+.code #\enul
+and
+.code nil
+for all other characters.
+
+.coNP Functions @ plusp and @ minusp
+.synb
+.mets (plusp << number )
+.mets (minusp << number )
+.syne
+.desc
+These functions test whether a number is positive or negative,
+returning
+.code t
+or
+.codn nil ,
+as the case may be.
+
+The argument may also be a character. All characters other than
+the null character
+.code #\enul
+are positive. No character is negative.
.coNP Functions @ evenp and @ oddp
.synb