Skip to content
Prev 31543 / 63424 Next

are arithmetic comparison operators binary?

Martin Maechler wrote:
point taken.
ok.
ok.
not quite sure what you mean by 'closeness to mathematical notation' here.
which is consistent with NULL + 1.  btw:

1. you might want to keep the error message from applying < and other
relops to an inappropriate number of arguments in sync with the message
one gets from, e.g., '+'(1,2,3).  (you may want to actually update the
message from '+' and relatives, as it seems that there are more
operators that give an error message similar to that of '<'.  the
attached patch fixes this; it has been compiled and successfully tested
-- see below.)

2. '+'() and '+'(1,2,3) say the operator needs one or two arguments, but
again, '+' is documented as a *binary* operator.  i guess the intention
here is to have them unary or binary, and it's the docs that should be
updated.

vQ


The patch for src/main/arithmetic.c was prepared as follows:

svn co https://svn.R-project.org/R/trunk/
cd trunk
tools/rsync-recommended
# modifications made to src/main/character.c
svn diff > do_grep.diff

The patched sources were successfully compiled and tested as follows:

svn revert -R .
patch -p0 < do_grep.diff
./configure
make
make check



-------------- next part --------------
A non-text attachment was scrubbed...
Name: arithmetic.diff
Type: text/x-diff
Size: 509 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-devel/attachments/20090224/d06f659d/attachment.bin>