summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-08-16 06:54:33 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-08-16 06:54:33 -0700
commitc77cd7d90f4a1549dacbf4b5e34827df2d6e4f03 (patch)
tree3ae642dc2162703404efceb85d4ac3e7c1fd88bd /txr.1
parent45e2d317b52cf5eec1212c175a39a97222ee9e3b (diff)
downloadtxr-c77cd7d90f4a1549dacbf4b5e34827df2d6e4f03.tar.gz
txr-c77cd7d90f4a1549dacbf4b5e34827df2d6e4f03.tar.bz2
txr-c77cd7d90f4a1549dacbf4b5e34827df2d6e4f03.zip
Allow character inputs in some bit operations.
* arith.c (logand, logior, logxor): Allow one operand to be a character, if the opposite opernad is a fixnum integer. The result is a character. (bit): Allow the value being tested to be a character. * txr.1: Updated.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.116
1 files changed, 15 insertions, 1 deletions
diff --git a/txr.1 b/txr.1
index 29195b97..a36c0f27 100644
--- a/txr.1
+++ b/txr.1
@@ -34865,6 +34865,20 @@ the value -1 (all bits 1). If
is called with no arguments it produces
zero. In the one-argument case, the functions just return their argument value.
+In the two-argument case, one of the operands may be a character, if the other
+operand is a fixnum integer. The character operand is taken to be an integer
+corresponding to the character value's Unicode code point value. The resulting
+value is regarded as a Unicode code point and converted to a character value
+accordingly.
+
+When three or more arguments are specified, the operation's semantics is
+that of a left-associative reduction through two-argument invocations,
+so that the three-argument case
+.code "(logand a b c)"
+is equivalent to the expression
+.codn "(logand (logand a b) c)" ,
+which features two two-argument cases..
+
.coNP Function @ logtest
.synb
.mets (logtest < int1 << int2 )
@@ -35008,7 +35022,7 @@ and
.desc
The
.code bit
-function tests whether the integer
+function tests whether the integer or character
.meta value
has a 1 in bit position
.metn bit .